pub trait IterateVariablesContext<'a> {
type VariableIterator: 'a + Iterator<Item = (String, Value)>;
type VariableNameIterator: 'a + Iterator<Item = String>;
// Required methods
fn iter_variables(&'a self) -> Self::VariableIterator;
fn iter_variable_names(&'a 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)>
type VariableIterator: 'a + Iterator<Item = (String, Value)>
The iterator type for iterating over variable name-value pairs.
Sourcetype VariableNameIterator: 'a + Iterator<Item = String>
type VariableNameIterator: 'a + Iterator<Item = String>
The iterator type for iterating over variable names.
Required Methods§
Sourcefn iter_variables(&'a self) -> Self::VariableIterator
fn iter_variables(&'a self) -> Self::VariableIterator
Returns an iterator over pairs of variable names and values.
Sourcefn iter_variable_names(&'a self) -> Self::VariableNameIterator
fn iter_variable_names(&'a self) -> Self::VariableNameIterator
Returns an iterator over variable names.