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.
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.