Shape

Trait Shape 

Source
pub unsafe trait Shape {
    type ARR<T>;

    const LEN: usize = 0usize;

    // Required method
    fn new<T>() -> Self::ARR<T>
       where T: Copy + Default;
}

Provided Associated Constants§

Source

const LEN: usize = 0usize

Required Associated Types§

Source

type ARR<T>

Required Methods§

Source

fn new<T>() -> Self::ARR<T>
where T: Copy + Default,

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 Shape for ()

Source§

type ARR<T> = ()

Source§

fn new<T>() -> <() as Shape>::ARR<T>

Implementors§

Source§

impl<const B: usize, const A: usize> Shape for Dim2<B, A>

Source§

const LEN: usize

Source§

type ARR<T> = [[T; A]; B]

Source§

impl<const C: usize, const B: usize, const A: usize> Shape for Dim3<C, B, A>

Source§

const LEN: usize

Source§

type ARR<T> = [[[T; A]; B]; C]

Source§

impl<const N: usize> Shape for Dim1<N>

Source§

const LEN: usize = N

Source§

type ARR<T> = [T; N]