[][src]Trait iterators_collection::ResettableIterator

pub trait ResettableIterator: Iterator {
    fn reset(&mut self);

    fn reset_clone(&self) -> Self
    where
        Self: Clone
, { ... }
fn resettable_map<F, R>(self, callback: F) -> ResettableMap<Self, F>
    where
        F: FnMut(Self::Item) -> R,
        Self: Sized
, { ... } }

A resettable iterator. It means that calling a reset method will set the iterator to the first position

Required methods

fn reset(&mut self)

Resets the iterator to its initial state when called

Loading content...

Provided methods

fn reset_clone(&self) -> Self where
    Self: Clone

Creates a new iterator from the current one and reset it

Important traits for ResettableMap<I, F>
fn resettable_map<F, R>(self, callback: F) -> ResettableMap<Self, F> where
    F: FnMut(Self::Item) -> R,
    Self: Sized

Creates a ResettableMap from the current iterator

Loading content...

Implementors

impl<'_, T> ResettableIterator for DoubleIterator<'_, T>[src]

impl<'_, T> ResettableIterator for SingleLineIterator<'_, T>[src]

impl<I, F, R> ResettableIterator for ResettableMap<I, F> where
    I: ResettableIterator,
    F: FnMut(I::Item) -> R, 
[src]

impl<T> ResettableIterator for Exclude<T> where
    T: ResettableIterator,
    T::Item: PartialEq
[src]

Loading content...