Struct little::OptionsTemplate [] [src]

pub struct OptionsTemplate<I> {
    // some fields omitted
}

Stores a map between String name and its index I.

Methods

impl<I: Eq + Hash + Copy> OptionsTemplate<I>

fn new(key_indices: HashMap<String, I>) -> OptionsTemplate<I>

fn empty() -> OptionsTemplate<I>

fn push<S: Into<String>>(&mut self, key: S, index: I)

fn build<'a, V: Clone>(&self, parameters: &'a HashMap<&'a str, V>) -> Result<Options<I, V>, Error>

Given this template, build a parameter map for specified value map.

This efectivelly gets rid of string mapping for values.

fn index_of<'a>(&self, key: &'a str) -> Option<I>

Return the index of a string name in this template.

Trait Implementations

Derived Implementations

impl<I: Debug> Debug for OptionsTemplate<I>

fn fmt(&self, __arg_0: &mut Formatter) -> Result