Trait rt_format::parser::ValueSource [−][src]
pub trait ValueSource<V> where
V: FormattableValue, {
fn next_value(&mut self) -> Option<&V>;
fn lookup_value_by_index(&self, idx: usize) -> Option<&V>;
fn lookup_value_by_name(&self, name: &str) -> Option<&V>;
}Expand description
A source of values to use when parsing the formatting string.
Required methods
fn next_value(&mut self) -> Option<&V>
fn next_value(&mut self) -> Option<&V>
Returns the next positional argument, if any. Calling lookup_value_by_index does not
affect which value will be returned by the next call to next_value.
fn lookup_value_by_index(&self, idx: usize) -> Option<&V>
fn lookup_value_by_index(&self, idx: usize) -> Option<&V>
Returns the positional argument with the given index, if any. Calling
lookup_value_by_index does not affect which value will be returned by the next call to
next_value.
fn lookup_value_by_name(&self, name: &str) -> Option<&V>
fn lookup_value_by_name(&self, name: &str) -> Option<&V>
Returns the named argument with the given name, if any.
