Skip to main content

NewRef

Trait NewRef 

Source
pub unsafe trait NewRef<T>: Repr {
    type Error;

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

Create a new MatRef 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 Repr.

Required Associated Types§

Source

type Error

Errors that can occur when initializing.

Required Methods§

Source

fn new_ref(self, slice: &[T]) -> Result<MatRef<'_, Self>, Self::Error>

Create a new MatRef 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> NewRef<T> for Standard<T>
where T: Copy,

Source§

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