#[repr(C)]pub struct SectionDescriptor {
pub section_type: u8,
pub alignment_tier: u8,
pub reserved16: u16,
pub byte_offset: u32,
pub byte_length: u32,
pub stride: u32,
pub element_count: u32,
pub crc32c: u32,
}Expand description
One row of the section table — a self-describing section descriptor.
Layout: 24 bytes, repr(C), naturally aligned, no padding.
offset size field
0 1 section_type (SectionType u8)
1 1 alignment_tier (AlignmentTier u8)
2 2 reserved16 (must be zero)
4 4 byte_offset (from file start)
8 4 byte_length (payload length in bytes)
12 4 stride (bytes per element for AoS sections; 0 = non-strided)
16 4 element_count (for array sections; 0 = non-array)
20 4 crc32c (CRC-32C over the payload bytes)Fields§
§section_type: u8§alignment_tier: u8§reserved16: u16§byte_offset: u32§byte_length: u32§stride: u32§element_count: u32§crc32c: u32Implementations§
Source§impl SectionDescriptor
impl SectionDescriptor
Sourcepub fn tier(&self) -> Option<AlignmentTier>
pub fn tier(&self) -> Option<AlignmentTier>
The alignment tier as a typed enum (or None if the raw byte is
undefined — the reader rejects this).
Sourcepub fn typ(&self) -> Option<SectionType>
pub fn typ(&self) -> Option<SectionType>
The section type as a typed enum (or None if undefined).
Trait Implementations§
Source§impl Clone for SectionDescriptor
impl Clone for SectionDescriptor
impl Copy for SectionDescriptor
Source§impl Debug for SectionDescriptor
impl Debug for SectionDescriptor
impl Eq for SectionDescriptor
Source§impl PartialEq for SectionDescriptor
impl PartialEq for SectionDescriptor
impl Pod for SectionDescriptor
impl StructuralPartialEq for SectionDescriptor
Auto Trait Implementations§
impl Freeze for SectionDescriptor
impl RefUnwindSafe for SectionDescriptor
impl Send for SectionDescriptor
impl Sync for SectionDescriptor
impl Unpin for SectionDescriptor
impl UnsafeUnpin for SectionDescriptor
impl UnwindSafe for SectionDescriptor
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
impl<T> AnyBitPattern for Twhere
T: Pod,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
§type Bits = T
type Bits = T
Self must have the same layout as the specified Bits except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern.§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self.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
§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
Compare self to
key and return true if they are equal.§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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
impl<T> Interleave for Twhere
T: Pod,
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