pub struct EvaluationContext<'c, E: Evaluate> { /* private fields */ }Expand description
Context that is used in the evaluation process of a block.
Implementations§
Source§impl<'c, E: Evaluate> EvaluationContext<'c, E>
impl<'c, E: Evaluate> EvaluationContext<'c, E>
pub fn new( global_variables: &'c Variables, local_variables: Vec<Variables>, builders: &'c HashMap<String, E>, functions: &'c HashMap<String, Box<dyn Fn(&[Value]) -> Value + 'static>>, max_depth: usize, warnings: EvaluationContextWarnings, context_location: ContextLocation, ) -> Self
pub fn spawn_new( &self, local_variables: Vec<Variables>, context_location: ContextLocation, ) -> Result<Self, ()>
pub fn get_evaluator(&self, name: &str) -> Option<&'c E>
pub fn get_function(&self, name: &str) -> Option<&'c ValueFunction>
pub fn get_variable_value(&self, name: &str) -> Option<Value>
pub fn push_variables(&mut self, variables: Variables)
pub fn pop_variables(&mut self)
pub fn assign_local_variable(&mut self, name: &str, value: Value)
Auto Trait Implementations§
impl<'c, E> Freeze for EvaluationContext<'c, E>
impl<'c, E> !RefUnwindSafe for EvaluationContext<'c, E>
impl<'c, E> !Send for EvaluationContext<'c, E>
impl<'c, E> !Sync for EvaluationContext<'c, E>
impl<'c, E> Unpin for EvaluationContext<'c, E>
impl<'c, E> !UnwindSafe for EvaluationContext<'c, 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