Skip to main content

NewMut

Trait NewMut 

Source
pub unsafe trait NewMut<T>: ReprMut {
    type Error;

    // Required method
    fn new_mut(self, slice: &mut [T]) -> Result<MatMut<'_, Self>, Self::Error>;
}
Expand description

Create a new MatMut over a slice.

§Safety

Implementations must validate the length (and any other requirements) of the provided slice to ensure it is compatible with the implementation of ReprMut.

Required Associated Types§

Source

type Error

Errors that can occur when initializing.

Required Methods§

Source

fn new_mut(self, slice: &mut [T]) -> Result<MatMut<'_, Self>, Self::Error>

Create a new MatMut over slice.

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.

Implementors§

Source§

impl<T> NewMut<T> for Standard<T>
where T: Copy,

Source§

impl<const NBITS: usize> NewMut<u8> for MinMaxMeta<NBITS>
where Unsigned: Representation<NBITS>,