pub trait RandomAccessSequenceMut<T: Copy>: RandomAccessSequence<T> {
// Required method
unsafe fn set_unchecked(&mut self, index: usize, value: T);
// Provided method
fn set(&mut self, index: usize, value: T) { ... }
}
Expand description
A trait for a mutable access to a collection of scalars.
Required Methods§
Sourceunsafe fn set_unchecked(&mut self, index: usize, value: T)
unsafe fn set_unchecked(&mut self, index: usize, value: T)
Sets the element at the given index to the given value.
§Safety
The caller must ensure that the index
< self.len()
.