Trait nalgebra::base::dimension::Dim [−][src]
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()
.
Provided Methods
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<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>
impl<U: Unsigned + DimName, B: Bit + Any + Debug + Copy + PartialEq + Send + Sync> Dim for UInt<U, B>
[src]
impl<U: Unsigned + DimName, B: Bit + Any + Debug + Copy + PartialEq + Send + Sync> Dim for UInt<U, B>
Implementors
impl Dim for Dynamic
impl Dim for U1
impl Dim for U0
impl Dim for U2
impl Dim for U3
impl Dim for U4
impl Dim for U5
impl Dim for U6
impl Dim for U7
impl Dim for U8
impl Dim for U9
impl Dim for U10
impl Dim for U11
impl Dim for U12
impl Dim for U13
impl Dim for U14
impl Dim for U15
impl Dim for U16
impl Dim for U17
impl Dim for U18
impl Dim for U19
impl Dim for U20
impl Dim for U21
impl Dim for U22
impl Dim for U23
impl Dim for U24
impl Dim for U25
impl Dim for U26
impl Dim for U27
impl Dim for U28
impl Dim for U29
impl Dim for U30
impl Dim for U31
impl Dim for U32
impl Dim for U33
impl Dim for U34
impl Dim for U35
impl Dim for U36
impl Dim for U37
impl Dim for U38
impl Dim for U39
impl Dim for U40
impl Dim for U41
impl Dim for U42
impl Dim for U43
impl Dim for U44
impl Dim for U45
impl Dim for U46
impl Dim for U47
impl Dim for U48
impl Dim for U49
impl Dim for U50
impl Dim for U51
impl Dim for U52
impl Dim for U53
impl Dim for U54
impl Dim for U55
impl Dim for U56
impl Dim for U57
impl Dim for U58
impl Dim for U59
impl Dim for U60
impl Dim for U61
impl Dim for U62
impl Dim for U63
impl Dim for U64
impl Dim for U65
impl Dim for U66
impl Dim for U67
impl Dim for U68
impl Dim for U69
impl Dim for U70
impl Dim for U71
impl Dim for U72
impl Dim for U73
impl Dim for U74
impl Dim for U75
impl Dim for U76
impl Dim for U77
impl Dim for U78
impl Dim for U79
impl Dim for U80
impl Dim for U81
impl Dim for U82
impl Dim for U83
impl Dim for U84
impl Dim for U85
impl Dim for U86
impl Dim for U87
impl Dim for U88
impl Dim for U89
impl Dim for U90
impl Dim for U91
impl Dim for U92
impl Dim for U93
impl Dim for U94
impl Dim for U95
impl Dim for U96
impl Dim for U97
impl Dim for U98
impl Dim for U99
impl Dim for U100
impl Dim for U101
impl Dim for U102
impl Dim for U103
impl Dim for U104
impl Dim for U105
impl Dim for U106
impl Dim for U107
impl Dim for U108
impl Dim for U109
impl Dim for U110
impl Dim for U111
impl Dim for U112
impl Dim for U113
impl Dim for U114
impl Dim for U115
impl Dim for U116
impl Dim for U117
impl Dim for U118
impl Dim for U119
impl Dim for U120
impl Dim for U121
impl Dim for U122
impl Dim for U123
impl Dim for U124
impl Dim for U125
impl Dim for U126
impl Dim for U127