Trait iter_trait::base::IterMut [] [src]

pub trait IterMut<'a>: Iter<'a> {
    type ItemMut: RefMut<'a, Self::Item>;
    type IterMut: Iterator<Item = Self::ItemMut>;
    fn iter_mut(&'a mut self) -> Self::IterMut;
}

A trait for collections which can be iterated by mutable reference.

In most cases, you shouldn't implement this trait directly; instead, you should implement IntoIterator for a mutable reference of this type, which will in turn implement this trait.

Associated Types

Type of the mutable references to the data in the collection.

Although this might just be &'a Item, it can also be more complicated. For example, an iterator with Item = (usize, T) might use (usize, &'a mut T) for this instead.

For more information, see the RefMut trait.

Type of the iterator over mutable references.

Required Methods

Constructs an iterator over mutable references to the data in this collection.

Implementors