Struct std::iter::Map

pub struct Map<'self, A, B, T> {
    priv iter: T,
    priv f: &'self fn(A) -> B,
}

An iterator which maps the values of iter with f

Trait Implementations

impl<'self, A, B, T: ExactSize<A>> ExactSize<B> for Map<'self, A, B, T>

impl<'self, A, B, T: Iterator<A>> Iterator<B> for Map<'self, A, B, T>

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

Advance the iterator and return the next value. Return None when the end is reached.

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

Return a lower bound and upper bound on the remaining length of the iterator.

The common use case for the estimate is pre-allocating space to store the results.

impl<'self, A, B, T: DoubleEndedIterator<A>> DoubleEndedIterator<B> for Map<'self, A, B, T>

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

Yield an element from the end of the range, returning None if the range is empty.

impl<'self, A, B, T: RandomAccessIterator<A>> RandomAccessIterator<B> for Map<'self, A, B, T>

fn indexable(&self) -> uint

Return the number of indexable elements. At most std::uint::max_value elements are indexable, even if the iterator represents a longer range.

fn idx(&self, index: uint) -> Option<B>

Return an element at an index