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

pub struct Scan<A, B, I, St, F> where I: Iterator, F: FnMut(&mut St, A) -> Option<B> {
    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> Clone for Scan<A, B, I, St, F> where I: Clone, I: Iterator, <I as Iterator>::Item == A, St: Clone, F: Clone, F: FnMut(&mut St, A) -> Option<B>

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

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

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

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

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

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

type Item