scuffle_cedar_policy/
lib.rs

1//! Cedar is a policy language used to express permisisons using a relationship model.
2//!
3//! This crate extends the [`cedar-policy`](https://docs.rs/cedar-policy) crate by adding some type safe traits and
4//! a code generator crate [`scuffle-cedar-policy-codegen`](https://docs.rs/scuffle-cedar-policy-codegen) which can be used
5//! to generate types from a cedar schema file.
6//!
7//! You can then use this in combo with cedar to have type-safe schema evaluation.
8#![cfg_attr(feature = "docs", doc = "\n\nSee the [changelog][changelog] for a full release history.")]
9#![cfg_attr(feature = "docs", doc = "## Feature flags")]
10#![cfg_attr(feature = "docs", doc = document_features::document_features!())]
11//! ## License
12//!
13//! This project is licensed under the MIT or Apache-2.0 license.
14//! You can choose between one of them if you use this work.
15//!
16//! `SPDX-License-Identifier: MIT OR Apache-2.0`
17#![cfg_attr(all(coverage_nightly, test), feature(coverage_attribute))]
18#![cfg_attr(docsrs, feature(doc_auto_cfg))]
19#![deny(missing_docs)]
20#![deny(unreachable_pub)]
21#![deny(clippy::mod_module_files)]
22#![deny(clippy::undocumented_unsafe_blocks)]
23#![deny(clippy::multiple_unsafe_ops_per_block)]
24
25mod action_request_error;
26mod entities_builder;
27mod entity;
28mod entity_ref;
29mod entity_type_name;
30mod traits;
31mod types;
32
33pub use action_request_error::CedarActionRequestError;
34pub use entities_builder::EntitiesBuilder;
35pub use entity::{Entity, EntityBuilder};
36pub use entity_ref::EntityUid;
37pub use entity_type_name::EntityTypeName;
38pub use traits::{CedarAction, CedarActionEntity, CedarChild, CedarEntity, CedarEnumEntity, CedarId};
39pub use types::{EmptyContext, NoAttributes, NoTag};
40
41#[doc(hidden)]
42pub mod macro_exports {
43    pub use {cedar_policy, cedar_policy_core, serde, serde_derive, smol_str};
44}
45
46/// Changelogs generated by [scuffle_changelog]
47#[cfg(feature = "docs")]
48#[scuffle_changelog::changelog]
49pub mod changelog {}