Skip to main content

OpsIndexMut

Trait OpsIndexMut 

Source
pub trait OpsIndexMut<Idx: ?Sized>: OpsIndex<Idx> {
    // Required method
    fn index_mut(&mut self, index: Idx) -> &mut Self::Output;
}

Required Methods§

Source

fn index_mut(&mut self, index: Idx) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation.

§Panics

May panic if the index is out of bounds.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§