PositionalArguments

Trait PositionalArguments 

Source
pub trait PositionalArguments<'v, V>
where V: 'v + FormatArgument,
{ type Iter: Iterator<Item = &'v V>; // Required methods fn get(&self, index: usize) -> Option<&V>; fn iter(&'v self) -> Self::Iter; }
Expand description

A type that provides a list of arguments, randomly accessible by their position.

Required Associated Types§

Source

type Iter: Iterator<Item = &'v V>

The type of the iterator that can be used to iterate over arguments.

Required Methods§

Source

fn get(&self, index: usize) -> Option<&V>

Returns a reference to the argument at the given index, if any.

Source

fn iter(&'v self) -> Self::Iter

Creates an iterator over the arguments.

Implementors§

Source§

impl<'v, V> PositionalArguments<'v, V> for NoPositionalArguments
where V: 'v + FormatArgument,

Source§

impl<'v, V, T> PositionalArguments<'v, V> for T
where V: 'v + FormatArgument, T: AsRef<[V]> + ?Sized,

Source§

type Iter = Iter<'v, V>