Trait evalexpr::IterateVariablesContext
source · pub trait IterateVariablesContext {
type VariableIterator<'a>: Iterator<Item = (String, Value)>
where Self: 'a;
type VariableNameIterator<'a>: Iterator<Item = String>
where Self: 'a;
// Required methods
fn iter_variables(&self) -> Self::VariableIterator<'_>;
fn iter_variable_names(&self) -> Self::VariableNameIterator<'_>;
}
Expand description
A context that allows to iterate over its variable names with their values.
Note: this trait will change after GATs are stabilised, because then we can get rid of the lifetime in the trait definition.
Required Associated Types§
sourcetype VariableIterator<'a>: Iterator<Item = (String, Value)>
where
Self: 'a
type VariableIterator<'a>: Iterator<Item = (String, Value)> where Self: 'a
The iterator type for iterating over variable name-value pairs.
sourcetype VariableNameIterator<'a>: Iterator<Item = String>
where
Self: 'a
type VariableNameIterator<'a>: Iterator<Item = String> where Self: 'a
The iterator type for iterating over variable names.
Required Methods§
sourcefn iter_variables(&self) -> Self::VariableIterator<'_>
fn iter_variables(&self) -> Self::VariableIterator<'_>
Returns an iterator over pairs of variable names and values.
sourcefn iter_variable_names(&self) -> Self::VariableNameIterator<'_>
fn iter_variable_names(&self) -> Self::VariableNameIterator<'_>
Returns an iterator over variable names.
Object Safety§
This trait is not object safe.