Struct cedar_policy_core::evaluator::RestrictedEvaluator
source · pub struct RestrictedEvaluator<'e> { /* private fields */ }
Expand description
Evaluator for “restricted” expressions. See notes on RestrictedExpr
.
Implementations§
source§impl<'e> RestrictedEvaluator<'e>
impl<'e> RestrictedEvaluator<'e>
sourcepub fn new(extensions: &'e Extensions<'e>) -> Self
pub fn new(extensions: &'e Extensions<'e>) -> Self
Create a fresh evaluator for evaluating “restricted” expressions
sourcepub fn interpret(
&self,
e: BorrowedRestrictedExpr<'_>,
) -> Result<Value, EvaluationError>
pub fn interpret( &self, e: BorrowedRestrictedExpr<'_>, ) -> Result<Value, EvaluationError>
Interpret a RestrictedExpr
into a Value
in this evaluation environment.
May return an error, for instance if an extension function returns an error
sourcepub fn partial_interpret(
&self,
e: BorrowedRestrictedExpr<'_>,
) -> Result<PartialValue, EvaluationError>
pub fn partial_interpret( &self, e: BorrowedRestrictedExpr<'_>, ) -> Result<PartialValue, EvaluationError>
Interpret a RestrictedExpr
into a Value
in this evaluation environment.
May return an error, for instance if an extension function returns an error
Trait Implementations§
Auto Trait Implementations§
impl<'e> Freeze for RestrictedEvaluator<'e>
impl<'e> !RefUnwindSafe for RestrictedEvaluator<'e>
impl<'e> Send for RestrictedEvaluator<'e>
impl<'e> Sync for RestrictedEvaluator<'e>
impl<'e> Unpin for RestrictedEvaluator<'e>
impl<'e> !UnwindSafe for RestrictedEvaluator<'e>
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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