Trait std::iter::ExactSizeIteratorStable [-] [+] [src]

pub trait ExactSizeIterator: Iterator where Self: Iterator {
    fn len(&self) -> usize { ... }
}

An iterator that knows its exact length

This trait is a helper for iterators like the vector iterator, so that it can support double-ended enumeration.

Iterator::size_hint must return the exact size of the iterator. Note that the size must fit in usize.

Provided Methods

fn len(&self) -> usize

Return the exact length of the iterator.

Implementors