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,
expr: BorrowedRestrictedExpr<'_>,
) -> Result<PartialValue, EvaluationError>
pub fn partial_interpret( &self, expr: 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
INVARIANT: If this returns a residual, the residual expression must be a valid restricted expression.
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