Trait std::iter::ExactSizeIterator [] [src]

pub trait ExactSizeIterator: 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

Returns the exact length of the iterator.