generic_array_storage

Trait Conv

Source
pub trait Conv {
    type TNum: ArrayLength;
    type Nalg: DimName;

    // Provided method
    fn new_nalg() -> Self::Nalg { ... }
}
Expand description

Convenience trait, used to define type conversions

Also, this is the only bound to GenericMatrix type alias, meaning that all of the following are valid GenericMatrixes:

type NalgebraMatrix = GenericMatrix<i32, nalgebra::U3, nalgebra::U4>;
type TypenumMatrix = GenericMatrix<i32, typenum::U3, typenum::U4>;
type TypenumConstMatrix = GenericMatrix<i32, typenum::Const<3>, typenum::Const<3>>;
// (nalgebra::Const are actually aliased by nalgebra::{U1, U2, ...})

Required Associated Types§

Source

type TNum: ArrayLength

typenum-faced type (unsigned int)

Source

type Nalg: DimName

nalgebra-faced type (matrix dimension)

Provided Methods§

Source

fn new_nalg() -> Self::Nalg

Constructor method used in nalgebra implementations

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 Conv for UTerm

Source§

impl<U> Conv for UInt<U, B0>
where U: ArrayLength + Conv, U::Nalg: DimNameMul<U2>,

Source§

type TNum = UInt<U, B0>

Source§

type Nalg = <<U as Conv>::Nalg as DimNameMul<Const<2>>>::Output

Source§

impl<U> Conv for UInt<U, B1>
where U: ArrayLength + Conv, UInt<U, B0>: Conv, <UInt<U, B0> as Conv>::Nalg: DimNameAdd<U1>,

Source§

type TNum = UInt<U, B1>

Source§

type Nalg = <<UInt<U, B0> as Conv>::Nalg as DimNameAdd<Const<1>>>::Output

Source§

impl<const N: usize> Conv for Const<N>
where Const<N>: IntoArrayLength,

Source§

type TNum = <Const<N> as IntoArrayLength>::ArrayLength

Source§

type Nalg = Const<N>

Source§

impl<const N: usize> Conv for Const<N>
where Self: IntoArrayLength,

Source§

type TNum = <Const<N> as IntoArrayLength>::ArrayLength

Source§

type Nalg = Const<N>

Implementors§