Skip to main content

ToDimension

Trait ToDimension 

Source
pub trait ToDimension<T, const N: usize>: ArrayWithSize<T, N> {
    // Provided methods
    fn to_1d(self) -> Self::WithSize<1>
       where T: Default { ... }
    fn to_2d(self) -> Self::WithSize<2>
       where T: Default { ... }
    fn to_3d(self) -> Self::WithSize<3>
       where T: Default { ... }
    fn to_4d(self) -> Self::WithSize<4>
       where T: Default { ... }
}

Provided Methods§

Source

fn to_1d(self) -> Self::WithSize<1>
where T: Default,

Source

fn to_2d(self) -> Self::WithSize<2>
where T: Default,

Source

fn to_3d(self) -> Self::WithSize<3>
where T: Default,

Source

fn to_4d(self) -> Self::WithSize<4>
where T: Default,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<S, T, const N: usize> ToDimension<T, N> for S
where S: ArrayWithSize<T, N>,