Trait RandomAccessSequenceMut

Source
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§

Source

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

Provided Methods§

Source

fn set(&mut self, index: usize, value: T)

Implementations on Foreign Types§

Source§

impl<T: Copy> RandomAccessSequenceMut<T> for &mut [T]

Source§

fn set(&mut self, index: usize, value: T)

Source§

unsafe fn set_unchecked(&mut self, index: usize, value: T)

Implementors§