pub trait SequenceMut<Item, Subsequence: SequenceMut<Item, Subsequence> + ?Sized>: Sequence<Item, Subsequence> + IndexMut<usize, Output = Item> + IndexMut<Range<usize>, Output = Subsequence> {
    type IteratorMut<'a>: Iterator<Item = &'a mut Item>
       where Self: 'a,
             Item: 'a;

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

A type behaving like a mutable sequence over the type Item. That is, its items can be mutated, but the sequence it self can not. For a sequence where items can be appended, rearranged etc. see EditableSequence.

Required Associated Types§

source

type IteratorMut<'a>: Iterator<Item = &'a mut Item> where Self: 'a, Item: 'a

The mutable iterator type of the sequence.

Required Methods§

source

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

Returns a mutable iterator over the sequence.

Implementations on Foreign Types§

source§

impl<Item> SequenceMut<Item, [Item]> for Vec<Item>

§

type IteratorMut<'a> = IterMut<'a, Item> where Item: 'a

source§

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

source§

impl<Item> SequenceMut<Item, [Item]> for [Item]

§

type IteratorMut<'a> = IterMut<'a, Item> where Item: 'a

source§

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

Implementors§