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> Unpin for Evaluator<'a>
impl<'a> !UnwindSafe 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