IterMut

Trait IterMut 

Source
pub trait IterMut: CollectionMut {
    type IterMut<'a>: Iterator<Item = Self::ItemMut<'a>>
       where Self: 'a;

    // Required method
    fn iter_mut(&mut self) -> Self::IterMut<'_>;
}
Expand description

Mutably iterable collection.

Required Associated Types§

Source

type IterMut<'a>: Iterator<Item = Self::ItemMut<'a>> where Self: 'a

Iterator type.

Required Methods§

Source

fn iter_mut(&mut self) -> Self::IterMut<'_>

Create an iterator over the mutable items of the collection.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<T> IterMut for Vec<T>

Source§

type IterMut<'a> = IterMut<'a, T> where Self: 'a

Source§

fn iter_mut(&mut self) -> Self::IterMut<'_>

Implementors§