Struct std::iter::Fuse

pub struct Fuse<T> {
    priv iter: T,
    priv done: bool,
}

An iterator that yields None forever after the underlying iterator yields None once.

Trait Implementations

impl<T: Clone> Clone for Fuse<T>

fn clone(&self) -> Fuse<T>

Returns a copy of the value. The contents of owned pointers are copied to maintain uniqueness, while the contents of managed pointers are not copied.

impl<T: DeepClone> DeepClone for Fuse<T>

fn deep_clone(&self) -> Fuse<T>

Return a deep copy of the value. Unlike Clone, the contents of shared pointer types are copied.

impl<A, T: Iterator<A>> Iterator<A> for Fuse<T>

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

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<A, T: DoubleEndedIterator<A>> DoubleEndedIterator<A> for Fuse<T>

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

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

impl<A, T: RandomAccessIterator<A>> RandomAccessIterator<A> for Fuse<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<A>

Return an element at an index