pub struct Dyn(pub usize);
Expand description
Dim of dynamically-sized algebraic entities.
Tuple Fields§
§0: usize
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Dyn
impl<'de> Deserialize<'de> for Dyn
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
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
impl Dim for Dyn
Source§fn try_to_usize() -> Option<usize>
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
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
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 is<D: Dim>() -> bool
Source§impl<D: DimName> DimEq<D, Dyn> for ShapeConstraint
impl<D: DimName> DimEq<D, Dyn> for ShapeConstraint
Source§type Representative = D
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>
fn representative(d1: D1, d2: D2) -> Option<Self::Representative>
This constructs a value of type
Representative
with the
correct valueSource§impl<D: DimName> DimEq<Dyn, D> for ShapeConstraint
impl<D: DimName> DimEq<Dyn, D> for ShapeConstraint
Source§type Representative = D
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>
fn representative(d1: D1, d2: D2) -> Option<Self::Representative>
This constructs a value of type
Representative
with the
correct valueSource§impl<D: DimName> SameDimension<D, Dyn> for ShapeConstraint
impl<D: DimName> SameDimension<D, Dyn> for ShapeConstraint
Source§type Representative = D
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
impl<D: DimName> SameDimension<Dyn, D> for ShapeConstraint
Source§type Representative = D
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
impl<D: DimName> SameNumberOfColumns<D, Dyn> for ShapeConstraint
Source§type Representative = D
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>
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
impl<D: DimName> SameNumberOfColumns<Dyn, D> for ShapeConstraint
Source§type Representative = D
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>
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
impl<D: DimName> SameNumberOfRows<D, Dyn> for ShapeConstraint
Source§type Representative = D
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>
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
impl<D: DimName> SameNumberOfRows<Dyn, D> for ShapeConstraint
Source§type Representative = D
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>
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
.impl Copy for Dyn
impl Eq for Dyn
impl IsDynamic for Dyn
impl IsNotStaticOne for Dyn
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
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
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
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.