Struct core::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 + Iterator<Item=A>, St: Clone, F: Clone + FnMut(&mut St, A) -> Option<B>

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

fn clone_from(&mut self, source: &Self)

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

type Item = B

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

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