pub struct ElementsFlattenedLength(pub u32);Expand description
Represents the total number of fields required to represent a single entry of an array or vector.
For example in the array [(u8, u16, [u32; 4]); 8] the elements flattened length is 6:
- u8 (1)
- u16 (1)
- [u32; 4] (4)
Tuple Fields§
§0: u32Implementations§
Trait Implementations§
Source§impl Clone for ElementsFlattenedLength
impl Clone for ElementsFlattenedLength
Source§fn clone(&self) -> ElementsFlattenedLength
fn clone(&self) -> ElementsFlattenedLength
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ElementsFlattenedLength
impl Debug for ElementsFlattenedLength
Source§impl<'de> Deserialize<'de> for ElementsFlattenedLength
impl<'de> Deserialize<'de> for ElementsFlattenedLength
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 Display for ElementsFlattenedLength
impl Display for ElementsFlattenedLength
Source§impl Div<ElementsFlattenedLength> for FlattenedLength
impl Div<ElementsFlattenedLength> for FlattenedLength
Source§type Output = SemanticLength
type Output = SemanticLength
The resulting type after applying the
/ operator.Source§impl From<FlattenedLength> for ElementsFlattenedLength
impl From<FlattenedLength> for ElementsFlattenedLength
Source§fn from(flattened_length: FlattenedLength) -> Self
fn from(flattened_length: FlattenedLength) -> Self
Assumes this flattened length represents a single entry in an array or vector,
Source§impl Hash for ElementsFlattenedLength
impl Hash for ElementsFlattenedLength
Source§impl Mul<ElementsFlattenedLength> for SemanticLength
impl Mul<ElementsFlattenedLength> for SemanticLength
Source§fn mul(self, rhs: ElementsFlattenedLength) -> Self::Output
fn mul(self, rhs: ElementsFlattenedLength) -> Self::Output
Computes the flattened length by multiplying the semantic length by the elements flattened length.
Source§type Output = FlattenedLength
type Output = FlattenedLength
The resulting type after applying the
* operator.Source§impl Mul<SemanticLength> for ElementsFlattenedLength
impl Mul<SemanticLength> for ElementsFlattenedLength
Source§fn mul(self, rhs: SemanticLength) -> Self::Output
fn mul(self, rhs: SemanticLength) -> Self::Output
Computes the flattened length by multiplying the semantic length by the elements flattened length.
Source§type Output = FlattenedLength
type Output = FlattenedLength
The resulting type after applying the
* operator.Source§impl Ord for ElementsFlattenedLength
impl Ord for ElementsFlattenedLength
Source§fn cmp(&self, other: &ElementsFlattenedLength) -> Ordering
fn cmp(&self, other: &ElementsFlattenedLength) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ElementsFlattenedLength
impl PartialEq for ElementsFlattenedLength
Source§impl PartialOrd for ElementsFlattenedLength
impl PartialOrd for ElementsFlattenedLength
Source§impl Serialize for ElementsFlattenedLength
impl Serialize for ElementsFlattenedLength
impl Copy for ElementsFlattenedLength
impl Eq for ElementsFlattenedLength
impl StructuralPartialEq for ElementsFlattenedLength
Auto Trait Implementations§
impl Freeze for ElementsFlattenedLength
impl RefUnwindSafe for ElementsFlattenedLength
impl Send for ElementsFlattenedLength
impl Sync for ElementsFlattenedLength
impl Unpin for ElementsFlattenedLength
impl UnwindSafe for ElementsFlattenedLength
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more