Struct nalgebra::base::dimension::Dyn

source ·
pub struct Dyn(pub usize);
Expand description

Dim of dynamically-sized algebraic entities.

Tuple Fields§

§0: usize

Implementations§

source§

impl Dyn

source

pub const fn new(value: usize) -> Self

👎Deprecated: use Dyn(value) instead.

A dynamic size equal to value.

Trait Implementations§

source§

impl Add<usize> for Dyn

§

type Output = Dyn

The resulting type after applying the + operator.
source§

fn add(self, rhs: usize) -> Self

Performs the + operation. Read more
source§

impl Clone for Dyn

source§

fn clone(&self) -> Dyn

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Dyn

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for Dyn

source§

fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Dim for Dyn

source§

fn try_to_usize() -> Option<usize>

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

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

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

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

source§

impl<D: Dim> DimAdd<D> for Dyn

§

type Output = Dyn

source§

fn add(self, other: D) -> Dyn

source§

impl<D: Dim> DimDiv<D> for Dyn

§

type Output = Dyn

source§

fn div(self, other: D) -> Dyn

source§

impl<D: DimName> DimEq<D, Dyn> for ShapeConstraint

§

type Representative = D

This is either equal to D1 or D2, always choosing the one (if any) which is a type-level constant.
source§

fn representative(d1: D1, d2: D2) -> Option<Self::Representative>

This constructs a value of type Representative with the correct value
source§

impl<D: DimName> DimEq<Dyn, D> for ShapeConstraint

§

type Representative = D

This is either equal to D1 or D2, always choosing the one (if any) which is a type-level constant.
source§

fn representative(d1: D1, d2: D2) -> Option<Self::Representative>

This constructs a value of type Representative with the correct value
source§

impl<D: Dim> DimMax<D> for Dyn

§

type Output = Dyn

source§

fn max(self, other: D) -> Dyn

source§

impl<D: Dim> DimMin<D> for Dyn

§

type Output = Dyn

source§

fn min(self, other: D) -> Dyn

source§

impl<D: Dim> DimMul<D> for Dyn

§

type Output = Dyn

source§

fn mul(self, other: D) -> Dyn

source§

impl<D: Dim> DimSub<D> for Dyn

§

type Output = Dyn

source§

fn sub(self, other: D) -> Dyn

source§

impl PartialEq for Dyn

source§

fn eq(&self, other: &Dyn) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<D: DimName> SameDimension<D, Dyn> for ShapeConstraint

§

type Representative = D

This is either equal to D1 or D2, always choosing the one (if any) which is a type-level constant.
source§

impl<D: DimName> SameDimension<Dyn, D> for ShapeConstraint

§

type Representative = D

This is either equal to D1 or D2, always choosing the one (if any) which is a type-level constant.
source§

impl<D: DimName> SameNumberOfColumns<D, Dyn> for ShapeConstraint

§

type Representative = D

This is either equal to D1 or D2, always choosing the one (if any) which is a type-level constant.
source§

fn representative( d1: D1, d2: D2, ) -> Option<<Self as SameNumberOfColumns<D1, D2>>::Representative>

Returns a representative dimension instance if the two are equal, otherwise None.
source§

impl<D: DimName> SameNumberOfColumns<Dyn, D> for ShapeConstraint

§

type Representative = D

This is either equal to D1 or D2, always choosing the one (if any) which is a type-level constant.
source§

fn representative( d1: D1, d2: D2, ) -> Option<<Self as SameNumberOfColumns<D1, D2>>::Representative>

Returns a representative dimension instance if the two are equal, otherwise None.
source§

impl<D: DimName> SameNumberOfRows<D, Dyn> for ShapeConstraint

§

type Representative = D

This is either equal to D1 or D2, always choosing the one (if any) which is a type-level constant.
source§

fn representative( d1: D1, d2: D2, ) -> Option<<Self as SameNumberOfRows<D1, D2>>::Representative>

Returns a representative dimension instance if the two are equal, otherwise None.
source§

impl<D: DimName> SameNumberOfRows<Dyn, D> for ShapeConstraint

§

type Representative = D

This is either equal to D1 or D2, always choosing the one (if any) which is a type-level constant.
source§

fn representative( d1: D1, d2: D2, ) -> Option<<Self as SameNumberOfRows<D1, D2>>::Representative>

Returns a representative dimension instance if the two are equal, otherwise None.
source§

impl Serialize for Dyn

source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Sub<usize> for Dyn

§

type Output = Dyn

The resulting type after applying the - operator.
source§

fn sub(self, rhs: usize) -> Self

Performs the - operation. Read more
source§

impl Copy for Dyn

source§

impl Eq for Dyn

source§

impl IsDynamic for Dyn

source§

impl IsNotStaticOne for Dyn

source§

impl StructuralPartialEq for Dyn

Auto Trait Implementations§

§

impl Freeze for Dyn

§

impl RefUnwindSafe for Dyn

§

impl Send for Dyn

§

impl Sync for Dyn

§

impl Unpin for Dyn

§

impl UnwindSafe for Dyn

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where T: Copy,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<D> DimAdd<Dyn> for D
where D: DimName,

§

type Output = Dyn

source§

fn add(self, other: Dyn) -> Dyn

source§

impl<D> DimDiv<Dyn> for D
where D: DimName,

§

type Output = Dyn

source§

fn div(self, other: Dyn) -> Dyn

source§

impl<D> DimMax<Dyn> for D
where D: DimName,

§

type Output = Dyn

source§

fn max(self, other: Dyn) -> Dyn

source§

impl<D> DimMin<Dyn> for D
where D: DimName,

§

type Output = Dyn

source§

fn min(self, other: Dyn) -> Dyn

source§

impl<D> DimMul<Dyn> for D
where D: DimName,

§

type Output = Dyn

source§

fn mul(self, other: Dyn) -> Dyn

source§

impl<D> DimSub<Dyn> for D
where D: DimName,

§

type Output = Dyn

source§

fn sub(self, other: Dyn) -> Dyn

source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
source§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
source§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

source§

impl<T> Scalar for T
where T: 'static + Clone + PartialEq + Debug,