pub struct SemiFlattenedLength(pub u32);Expand description
Represents the number of value/memory slots required to represent an array or vector. The semi-flattened length can be computed by multiplying the semantic length by the element types length.
For example in the array [(u8, u16, [u32; 4]); 8]:
- The semantic length is 8
- The element types length is 3
- The semi-flattened length is 24 (8 * 3)
The reason the semi-flattened length is required, and different than the semantic length, is that in our SSA tuples are flattened so the number of value slots needed to represent an array is different than the semantic length
Note that this is different from the fully flattened length, which would be 8 * (1 + 1 + 4) = 48.
Tuple Fields§
§0: u32Implementations§
Trait Implementations§
Source§impl Clone for SemiFlattenedLength
impl Clone for SemiFlattenedLength
Source§fn clone(&self) -> SemiFlattenedLength
fn clone(&self) -> SemiFlattenedLength
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 SemiFlattenedLength
impl Debug for SemiFlattenedLength
Source§impl<'de> Deserialize<'de> for SemiFlattenedLength
impl<'de> Deserialize<'de> for SemiFlattenedLength
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 SemiFlattenedLength
impl Display for SemiFlattenedLength
Source§impl Div<ElementTypesLength> for SemiFlattenedLength
impl Div<ElementTypesLength> for SemiFlattenedLength
Source§type Output = SemanticLength
type Output = SemanticLength
The resulting type after applying the
/ operator.Source§impl Hash for SemiFlattenedLength
impl Hash for SemiFlattenedLength
Source§impl Ord for SemiFlattenedLength
impl Ord for SemiFlattenedLength
Source§fn cmp(&self, other: &SemiFlattenedLength) -> Ordering
fn cmp(&self, other: &SemiFlattenedLength) -> 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 SemiFlattenedLength
impl PartialEq for SemiFlattenedLength
Source§impl PartialOrd for SemiFlattenedLength
impl PartialOrd for SemiFlattenedLength
Source§impl Serialize for SemiFlattenedLength
impl Serialize for SemiFlattenedLength
impl Copy for SemiFlattenedLength
impl Eq for SemiFlattenedLength
impl StructuralPartialEq for SemiFlattenedLength
Auto Trait Implementations§
impl Freeze for SemiFlattenedLength
impl RefUnwindSafe for SemiFlattenedLength
impl Send for SemiFlattenedLength
impl Sync for SemiFlattenedLength
impl Unpin for SemiFlattenedLength
impl UnwindSafe for SemiFlattenedLength
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