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§

source

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

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

source

type VariableNameIterator<'a>: Iterator<Item = String> where Self: 'a

The iterator type for iterating over variable names.

Required Methods§

source

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

Returns an iterator over pairs of variable names and values.

source

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

Returns an iterator over variable names.

Implementors§