Trait nalgebra::base::dimension::Dim[][src]

pub trait Dim: Any + Debug + Copy + PartialEq + Send {
    fn try_to_usize() -> Option<usize>;
fn value(&self) -> usize;
fn from_usize(dim: usize) -> Self; fn is<D: Dim>() -> bool { ... } }

Trait implemented by any type that can be used as a dimension. This includes type-level integers and Dynamic (for dimensions not known at compile-time).

Required Methods

Gets the compile-time value of Self. Returns None if it is not known, i.e., if Self = Dynamic.

Gets the run-time value of self. For type-level integers, this is the same as Self::try_to_usize().unwrap().

Builds an instance of Self from a run-time value. Panics if Self is a type-level integer and dim != Self::try_to_usize().unwrap().

Provided Methods

Implementations on Foreign Types

impl<A: Bit + Any + Debug + Copy + PartialEq + Send, B: Bit + Any + Debug + Copy + PartialEq + Send, C: Bit + Any + Debug + Copy + PartialEq + Send, D: Bit + Any + Debug + Copy + PartialEq + Send, E: Bit + Any + Debug + Copy + PartialEq + Send, F: Bit + Any + Debug + Copy + PartialEq + Send, G: Bit + Any + Debug + Copy + PartialEq + Send> Dim for UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, A>, B>, C>, D>, E>, F>, G>
[src]

impl<U: Unsigned + DimName, B: Bit + Any + Debug + Copy + PartialEq + Send> Dim for UInt<U, B>
[src]

Implementors