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

pub trait Dim: Any + Debug + Copy + PartialEq + Send + Sync {
    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

fn try_to_usize() -> Option<usize>

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

fn value(&self) -> usize

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

fn from_usize(dim: usize) -> Self

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().

Loading content...

Provided methods

fn is<D: Dim>() -> bool

Loading content...

Implementations on Foreign Types

impl<A: Bit + Any + Debug + Copy + PartialEq + Send + Sync, B: Bit + Any + Debug + Copy + PartialEq + Send + Sync, C: Bit + Any + Debug + Copy + PartialEq + Send + Sync, D: Bit + Any + Debug + Copy + PartialEq + Send + Sync, E: Bit + Any + Debug + Copy + PartialEq + Send + Sync, F: Bit + Any + Debug + Copy + PartialEq + Send + Sync, G: Bit + Any + Debug + Copy + PartialEq + Send + Sync> 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 + Sync> Dim for UInt<U, B>[src]

Loading content...

Implementors

impl Dim for Dynamic[src]

impl Dim for U0[src]

impl Dim for U1[src]

impl Dim for U10[src]

impl Dim for U100[src]

impl Dim for U101[src]

impl Dim for U102[src]

impl Dim for U103[src]

impl Dim for U104[src]

impl Dim for U105[src]

impl Dim for U106[src]

impl Dim for U107[src]

impl Dim for U108[src]

impl Dim for U109[src]

impl Dim for U11[src]

impl Dim for U110[src]

impl Dim for U111[src]

impl Dim for U112[src]

impl Dim for U113[src]

impl Dim for U114[src]

impl Dim for U115[src]

impl Dim for U116[src]

impl Dim for U117[src]

impl Dim for U118[src]

impl Dim for U119[src]

impl Dim for U12[src]

impl Dim for U120[src]

impl Dim for U121[src]

impl Dim for U122[src]

impl Dim for U123[src]

impl Dim for U124[src]

impl Dim for U125[src]

impl Dim for U126[src]

impl Dim for U127[src]

impl Dim for U13[src]

impl Dim for U14[src]

impl Dim for U15[src]

impl Dim for U16[src]

impl Dim for U17[src]

impl Dim for U18[src]

impl Dim for U19[src]

impl Dim for U2[src]

impl Dim for U20[src]

impl Dim for U21[src]

impl Dim for U22[src]

impl Dim for U23[src]

impl Dim for U24[src]

impl Dim for U25[src]

impl Dim for U26[src]

impl Dim for U27[src]

impl Dim for U28[src]

impl Dim for U29[src]

impl Dim for U3[src]

impl Dim for U30[src]

impl Dim for U31[src]

impl Dim for U32[src]

impl Dim for U33[src]

impl Dim for U34[src]

impl Dim for U35[src]

impl Dim for U36[src]

impl Dim for U37[src]

impl Dim for U38[src]

impl Dim for U39[src]

impl Dim for U4[src]

impl Dim for U40[src]

impl Dim for U41[src]

impl Dim for U42[src]

impl Dim for U43[src]

impl Dim for U44[src]

impl Dim for U45[src]

impl Dim for U46[src]

impl Dim for U47[src]

impl Dim for U48[src]

impl Dim for U49[src]

impl Dim for U5[src]

impl Dim for U50[src]

impl Dim for U51[src]

impl Dim for U52[src]

impl Dim for U53[src]

impl Dim for U54[src]

impl Dim for U55[src]

impl Dim for U56[src]

impl Dim for U57[src]

impl Dim for U58[src]

impl Dim for U59[src]

impl Dim for U6[src]

impl Dim for U60[src]

impl Dim for U61[src]

impl Dim for U62[src]

impl Dim for U63[src]

impl Dim for U64[src]

impl Dim for U65[src]

impl Dim for U66[src]

impl Dim for U67[src]

impl Dim for U68[src]

impl Dim for U69[src]

impl Dim for U7[src]

impl Dim for U70[src]

impl Dim for U71[src]

impl Dim for U72[src]

impl Dim for U73[src]

impl Dim for U74[src]

impl Dim for U75[src]

impl Dim for U76[src]

impl Dim for U77[src]

impl Dim for U78[src]

impl Dim for U79[src]

impl Dim for U8[src]

impl Dim for U80[src]

impl Dim for U81[src]

impl Dim for U82[src]

impl Dim for U83[src]

impl Dim for U84[src]

impl Dim for U85[src]

impl Dim for U86[src]

impl Dim for U87[src]

impl Dim for U88[src]

impl Dim for U89[src]

impl Dim for U9[src]

impl Dim for U90[src]

impl Dim for U91[src]

impl Dim for U92[src]

impl Dim for U93[src]

impl Dim for U94[src]

impl Dim for U95[src]

impl Dim for U96[src]

impl Dim for U97[src]

impl Dim for U98[src]

impl Dim for U99[src]

Loading content...