Trait miniconf::Keys

source ·
pub trait Keys {
    // Required methods
    fn next(&mut self, lookup: &KeyLookup) -> Result<usize, Traversal>;
    fn finalize(&mut self) -> Result<(), Traversal>;

    // Provided method
    fn chain<U: IntoKeys>(self, other: U) -> Chain<Self, U::IntoKeys>
       where Self: Sized { ... }
}
Expand description

Capability to yield and look up Keys

Required Methods§

source

fn next(&mut self, lookup: &KeyLookup) -> Result<usize, Traversal>

Look up the next key in a KeyLookup and convert to usize index.

This must be fused (like core::iter::FusedIterator).

source

fn finalize(&mut self) -> Result<(), Traversal>

Finalize the keys, ensure there are no more.

This must be fused.

Provided Methods§

source

fn chain<U: IntoKeys>(self, other: U) -> Chain<Self, U::IntoKeys>
where Self: Sized,

Chain another Keys to this one.

Implementations on Foreign Types§

source§

impl<T> Keys for &mut T
where T: Keys + ?Sized,

source§

fn next(&mut self, lookup: &KeyLookup) -> Result<usize, Traversal>

source§

fn finalize(&mut self) -> Result<(), Traversal>

Implementors§

source§

impl Keys for Packed

source§

impl<T> Keys for KeysIter<T>
where T: Iterator, T::Item: Key,

source§

impl<T: Keys, U: Keys> Keys for Chain<T, U>