pub struct EmptyContextWithBuiltinFunctions;
Expand description
A context that returns None
for each identifier.
Builtin functions are enabled and cannot be disabled.
Trait Implementations§
source§impl Context for EmptyContextWithBuiltinFunctions
impl Context for EmptyContextWithBuiltinFunctions
source§fn are_builtin_functions_disabled(&self) -> bool
fn are_builtin_functions_disabled(&self) -> bool
Builtin functions are always enabled for EmptyContextWithBuiltinFunctions.
source§fn set_builtin_functions_disabled(
&mut self,
disabled: bool
) -> EvalexprResult<()>
fn set_builtin_functions_disabled( &mut self, disabled: bool ) -> EvalexprResult<()>
Builtin functions can’t be disabled for EmptyContextWithBuiltinFunctions.
source§fn 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.
source§fn 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
.source§impl Default for EmptyContextWithBuiltinFunctions
impl Default for EmptyContextWithBuiltinFunctions
source§fn default() -> EmptyContextWithBuiltinFunctions
fn default() -> EmptyContextWithBuiltinFunctions
Returns the “default value” for a type. Read more
source§impl IterateVariablesContext for EmptyContextWithBuiltinFunctions
impl IterateVariablesContext for EmptyContextWithBuiltinFunctions
§type VariableIterator<'a> = Empty<(String, Value)>
type VariableIterator<'a> = Empty<(String, Value)>
The iterator type for iterating over variable name-value pairs.
§type VariableNameIterator<'a> = Empty<String>
type VariableNameIterator<'a> = Empty<String>
The iterator type for iterating over variable names.
source§fn iter_variables(&self) -> Self::VariableIterator<'_>
fn iter_variables(&self) -> Self::VariableIterator<'_>
Returns an iterator over pairs of variable names and values.
source§fn iter_variable_names(&self) -> Self::VariableNameIterator<'_>
fn iter_variable_names(&self) -> Self::VariableNameIterator<'_>
Returns an iterator over variable names.
Auto Trait Implementations§
impl RefUnwindSafe for EmptyContextWithBuiltinFunctions
impl Send for EmptyContextWithBuiltinFunctions
impl Sync for EmptyContextWithBuiltinFunctions
impl Unpin for EmptyContextWithBuiltinFunctions
impl UnwindSafe for EmptyContextWithBuiltinFunctions
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