pub struct Evaluator<'a> { /* private fields */ }Expand description
An evaluator for Scripts.
Implementations§
Source§impl<'a> Evaluator<'a>
impl<'a> Evaluator<'a>
Sourcepub fn bind_vars<K>(&mut self, name: &str, value: K)where
K: IntoValue,
pub fn bind_vars<K>(&mut self, name: &str, value: K)where
K: IntoValue,
Binds a set of values to a variable indentified by the name argument,
nested into the vars namespace.
Sourcepub fn bind_payload(&mut self, binding: &dyn PayloadBinding)
pub fn bind_payload(&mut self, binding: &dyn PayloadBinding)
Binds a payload to the payload variable.
Sourcepub fn bind_attributes(&mut self, binding: &dyn AttributesBinding)
pub fn bind_attributes(&mut self, binding: &dyn AttributesBinding)
Binds a set of actual attributes to the attributes namespace.
Sourcepub fn bind_authentication(&mut self, binding: &dyn AuthenticationBinding)
pub fn bind_authentication(&mut self, binding: &dyn AuthenticationBinding)
Binds a set of actual authentication properties to the authentication namespace.
Sourcepub fn eval(self) -> Result<Value, EvaluationError>
pub fn eval(self) -> Result<Value, EvaluationError>
Evals the script with the given bindings and returns the resulting Value.
Returns an EvaluationError when errors occurs during the evaluation.
Auto Trait Implementations§
impl<'a> !Freeze for Evaluator<'a>
impl<'a> !RefUnwindSafe for Evaluator<'a>
impl<'a> !Send for Evaluator<'a>
impl<'a> !Sync for Evaluator<'a>
impl<'a> !UnwindSafe for Evaluator<'a>
impl<'a> Unpin for Evaluator<'a>
impl<'a> UnsafeUnpin for Evaluator<'a>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<C, T> Extract<T> for Cwhere
T: FromContext<C>,
impl<C, T> Extract<T> for Cwhere
T: FromContext<C>,
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