Struct std::iter::ScanStable [-] [+] [src]

#[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
pub struct Scan<I, St, F> {
    pub state: St,
    // some fields omitted
}

An iterator to maintain state while iterating another iterator

Fields

state

The current internal state to be passed to the closure next.

Trait Implementations

impl<A, B, I, St, F> Iterator for Scan<I, St, F> where I: Iterator, <I as Iterator>::Item == A, F: FnMut(&mut St, A), <F as FnMut(&mut St, A)>::Output == Option<B>

type Item = B

fn next(&mut self) -> Option<B>

fn size_hint(&self) -> (usize, Option<usize>)

fn size_hint(&self) -> (usize, Option<usize>)

Derived Implementations

impl<I, St, F> Clone for Scan<I, St, F> where I: Clone, St: Clone, F: Clone

fn clone(&self) -> Scan<I, St, F>

fn clone_from(&mut self, &Scan<I, St, F>)