pub trait ArgumentSource<V>where
V: FormatArgument,{
// Required methods
fn next_argument(&mut self) -> Option<&V>;
fn lookup_argument_by_index(&self, idx: usize) -> Option<&V>;
fn lookup_argument_by_name(&self, name: &str) -> Option<&V>;
}Expand description
A source of values to use when parsing the formatting string.
Required Methods§
Sourcefn next_argument(&mut self) -> Option<&V>
fn next_argument(&mut self) -> Option<&V>
Returns the next positional argument, if any. Calling lookup_argument_by_index does not
affect which value will be returned by the next call to next_argument.
Sourcefn lookup_argument_by_index(&self, idx: usize) -> Option<&V>
fn lookup_argument_by_index(&self, idx: usize) -> Option<&V>
Returns the positional argument with the given index, if any. Calling
lookup_argument_by_index does not affect which value will be returned by the next call to
next_argument.
Sourcefn lookup_argument_by_name(&self, name: &str) -> Option<&V>
fn lookup_argument_by_name(&self, name: &str) -> Option<&V>
Returns the named argument with the given name, if any.