Trait IterateVariablesContext

Source
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§

Source

type VariableIterator: 'a + Iterator<Item = (String, Value)>

The iterator type for iterating over variable name-value pairs.

Source

type VariableNameIterator: 'a + Iterator<Item = String>

The iterator type for iterating over variable names.

Required Methods§

Source

fn iter_variables(&'a self) -> Self::VariableIterator

Returns an iterator over pairs of variable names and values.

Source

fn iter_variable_names(&'a self) -> Self::VariableNameIterator

Returns an iterator over variable names.

Implementors§