pub struct SectionInput<'a> {
pub section_type: SectionType,
pub alignment_tier: AlignmentTier,
pub stride: u32,
pub element_count: u32,
pub payload: &'a [u8],
}Expand description
A caller-supplied section input for encode_container. The writer
computes byte_offset, crc32c, and the canonical order; the caller
supplies the type, tier, stride/element_count (for array sections), and
the payload bytes.
Fields§
§section_type: SectionType§alignment_tier: AlignmentTier§stride: u32Bytes per element for array-of-structs sections. 0 for non-strided
(blob) sections. If non-zero, stride * element_count must equal
payload.len() or the writer rejects the input as stride-inconsistent.
element_count: u32Element count for array sections. 0 for non-array (blob) sections.
payload: &'a [u8]Trait Implementations§
Source§impl<'a> Clone for SectionInput<'a>
impl<'a> Clone for SectionInput<'a>
Source§fn clone(&self) -> SectionInput<'a>
fn clone(&self) -> SectionInput<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for SectionInput<'a>
impl<'a> Debug for SectionInput<'a>
impl<'a> Copy for SectionInput<'a>
Auto Trait Implementations§
impl<'a> Freeze for SectionInput<'a>
impl<'a> RefUnwindSafe for SectionInput<'a>
impl<'a> Send for SectionInput<'a>
impl<'a> Sync for SectionInput<'a>
impl<'a> Unpin for SectionInput<'a>
impl<'a> UnsafeUnpin for SectionInput<'a>
impl<'a> UnwindSafe for SectionInput<'a>
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.
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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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