pub trait Context {
    // Required methods
    fn get_value(&self, identifier: &str) -> Option<&Value>;
    fn call_function(
        &self,
        identifier: &str,
        argument: &Value,
    ) -> EvalexprResult<Value>;
}Expand description
An immutable context.
Required Methods§
Sourcefn get_value(&self, identifier: &str) -> Option<&Value>
 
fn get_value(&self, identifier: &str) -> Option<&Value>
Returns the value that is linked to the given identifier.
Sourcefn call_function(
    &self,
    identifier: &str,
    argument: &Value,
) -> EvalexprResult<Value>
 
fn call_function( &self, identifier: &str, argument: &Value, ) -> EvalexprResult<Value>
Calls the function that is linked to the given identifier with the given argument.
If no function with the given identifier is found, this method returns EvalexprError::FunctionIdentifierNotFound.