pub struct CompiledPolicySet { /* private fields */ }Expand description
Represents a symbolically compiled policyset. This can be fed into various
functions on CedarSymCompiler for efficient solver queries (that don’t
have to repeat symbolic compilation).
Implementations§
Source§impl CompiledPolicySet
impl CompiledPolicySet
Sourcepub fn compile(
pset: &PolicySet,
env: &RequestEnv,
schema: &Schema,
) -> Result<Self>
pub fn compile( pset: &PolicySet, env: &RequestEnv, schema: &Schema, ) -> Result<Self>
Compile a policyset for the given RequestEnv.
This does all the validating and well-typing that you need; you need not
(and should not) call WellTypedPolicies::from_policies() prior to
calling this.
Sourcepub fn compile_with_custom_symenv(
pset: &PolicySet,
env: &RequestEnv,
schema: &Schema,
symenv: SymEnv,
) -> Result<Self>
pub fn compile_with_custom_symenv( pset: &PolicySet, env: &RequestEnv, schema: &Schema, symenv: SymEnv, ) -> Result<Self>
Compile a set of policies for the given RequestEnv, using a custom
SymEnv rather than the one that would naturally be derived from this
RequestEnv.
Most often, you want compile() instead.
compile_with_custom_symenv() is generally used to compile with
SymEnvs that are more concrete than the default SymEnvs, with
constraints/concretizations of the entity hierarchy or request
variables.
Caller is responsible for some currently-undocumented invariants about
the relationship between the RequestEnv and the SymEnv.
This function has no analogue in the Lean (as of this writing).
Use at your own risk.
Trait Implementations§
Source§impl Clone for CompiledPolicySet
impl Clone for CompiledPolicySet
Source§fn clone(&self) -> CompiledPolicySet
fn clone(&self) -> CompiledPolicySet
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for CompiledPolicySet
impl RefUnwindSafe for CompiledPolicySet
impl Send for CompiledPolicySet
impl Sync for CompiledPolicySet
impl Unpin for CompiledPolicySet
impl UnsafeUnpin for CompiledPolicySet
impl UnwindSafe for CompiledPolicySet
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more