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

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

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

Implementors