AsArrayMut

Trait AsArrayMut 

Source
pub trait AsArrayMut<T>: AsArrayRef<T> {
    // Required method
    fn as_array_mut(&mut self) -> &mut Array<T, Self::Size>;
}
Expand description

Obtain a &mut Array reference for a given type.

Companion trait to AsArrayRef for mutable references, equivalent to AsMut or BorrowMut.

Required Methods§

Source

fn as_array_mut(&mut self) -> &mut Array<T, Self::Size>

Converts this type into a mutable Array reference.

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.

Implementations on Foreign Types§

Source§

impl<T, U, const N: usize> AsArrayMut<T> for [T; N]
where Self: AssocArraySize<Size = U>, U: ArraySize<ArrayType<T> = Self>,

Source§

fn as_array_mut(&mut self) -> &mut Array<T, U>

Implementors§

Source§

impl<T, U> AsArrayMut<T> for Array<T, U>
where U: ArraySize,