pub type U61 = Const<61>;
Aliased Type§
struct U61;
Trait Implementations
Source§impl<'de, const D: usize> Deserialize<'de> for Const<D>
impl<'de, const D: usize> Deserialize<'de> for Const<D>
Source§fn deserialize<Des>(
deserializer: Des,
) -> Result<Const<D>, <Des as Deserializer<'de>>::Error>where
Des: Deserializer<'de>,
fn deserialize<Des>(
deserializer: Des,
) -> Result<Const<D>, <Des as Deserializer<'de>>::Error>where
Des: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<const T: usize> Dim for Const<T>
impl<const T: usize> Dim for Const<T>
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 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()
.Source§fn from_usize(dim: usize) -> Const<T>
fn from_usize(dim: usize) -> Const<T>
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()
.fn is<D>() -> boolwhere
D: Dim,
Source§impl<const D: usize> Serialize for Const<D>
impl<const D: usize> Serialize for Const<D>
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more