Trait traitsequence::interface::SequenceMut
source · 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§
sourcetype IteratorMut<'a>: Iterator<Item = &'a mut Item>
where
Self: 'a,
Item: 'a
type IteratorMut<'a>: Iterator<Item = &'a mut Item> where Self: 'a, Item: 'a
The mutable iterator type of the sequence.
Required Methods§
sourcefn iter_mut(&mut self) -> Self::IteratorMut<'_>
fn iter_mut(&mut self) -> Self::IteratorMut<'_>
Returns a mutable iterator over the sequence.