simd_json::prelude

Trait IndexedMut

source
pub trait IndexedMut<T> {
    type Element: ?Sized;

    // Required method
    fn get_mut(&mut self, i: T) -> Option<&mut Self::Element>;
}
Expand description

Trait for indexing into an array

Required Associated Types§

source

type Element: ?Sized

Elements of the array

Required Methods§

source

fn get_mut(&mut self, i: T) -> Option<&mut Self::Element>

Gets a ref to a value based on n index, returns None if the current Value isn’t an Array or doesn’t contain the index it was asked for.

Implementations on Foreign Types§

source§

impl<T, I> IndexedMut<I> for Vec<T>
where I: SliceIndex<[T]>,

source§

type Element = <I as SliceIndex<[T]>>::Output

source§

fn get_mut(&mut self, i: I) -> Option<&mut <Vec<T> as IndexedMut<I>>::Element>

Implementors§