Trait eclectic::Iter [] [src]

pub trait Iter: Collection {
    fn iter<'a>(&'a self) -> Box<Iterator<Item=&'a Self::Item> + 'a>;
    fn iter_mut<'a>(&'a mut self) -> Box<Iterator<Item=&'a mut Self::Item> + 'a> where Self: Mutate;
}

A collection that supports by-reference iteration.

Maps are not expected to implement this interface, because they often provide Iterator<Item = (&Self::Key, &Self::Value)>.

Required Methods

Returns an iterator that yields references to the collection's items.

The iteration order is unspecified, but subtraits may place a requirement on it.

Returns an iterator that yields mutable references to the collection's items.

The iteration order is unspecified, but subtraits may place a requirement on it.

Implementors