pub enum SectionTableError {
Show 17 variants
TooManySections {
count: usize,
},
DuplicateSectionType {
section_type: u8,
},
UnsupportedSectionType {
got: u8,
},
UnsupportedAlignmentTier {
got: u8,
},
StrideInconsistent {
section_type: u8,
stride: u32,
element_count: u32,
payload_len: usize,
},
OutputBufferTooSmall {
needed: usize,
have: usize,
},
InputTooShort {
got: usize,
need: usize,
},
BadSectionTablePointer {
offset: u32,
count: u32,
},
NonZeroDescriptorReserved {
index: usize,
},
MisalignedSection {
index: usize,
offset: u32,
tier: AlignmentTier,
},
OutOfBounds {
index: usize,
offset: u32,
length: u32,
file_len: usize,
},
OverlappingSections {
index_a: usize,
index_b: usize,
},
StrideInconsistentDescriptor {
index: usize,
stride: u32,
element_count: u32,
byte_length: u32,
},
UndefinedSectionType {
index: usize,
got: u8,
},
UndefinedAlignmentTier {
index: usize,
got: u8,
},
CrcMismatch {
index: usize,
section_type: u8,
expected: u32,
got: u32,
},
NonZeroPadding {
at: usize,
},
}Expand description
Section-table encode/decode error.
Variants§
TooManySections
More than MAX_SECTION_COUNT sections.
DuplicateSectionType
Two sections share the same section_type (canonical encoding
requires unique types in v1).
UnsupportedSectionType
A section type byte is not a defined variant, or is Undefined, or is
a SpecReserved* type the v1 writer refuses to emit.
UnsupportedAlignmentTier
An alignment tier byte is not a defined variant.
StrideInconsistent
stride * element_count != payload.len().
OutputBufferTooSmall
The caller-supplied output buffer is too small.
InputTooShort
The input bytes are too short to hold the header + section table.
BadSectionTablePointer
The header’s section-table pointer is inconsistent (offset/count mismatch, offset below header, or count over the max).
NonZeroDescriptorReserved
A descriptor’s reserved16 is non-zero.
MisalignedSection
A descriptor’s byte_offset is misaligned relative to its tier.
OutOfBounds
A descriptor’s byte_offset/byte_length is out of bounds.
OverlappingSections
Two descriptors’ payload regions overlap.
StrideInconsistentDescriptor
A descriptor’s stride * element_count != byte_length.
UndefinedSectionType
A descriptor’s section type is Undefined or an unknown byte.
UndefinedAlignmentTier
A descriptor’s alignment tier is undefined.
CrcMismatch
A payload’s CRC-32C does not match the stored value (a flipped bit).
NonZeroPadding
A padding region between sections is non-zero.
Trait Implementations§
Source§impl Clone for SectionTableError
impl Clone for SectionTableError
Source§fn clone(&self) -> SectionTableError
fn clone(&self) -> SectionTableError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SectionTableError
impl Debug for SectionTableError
Source§impl Display for SectionTableError
impl Display for SectionTableError
Source§impl Error for SectionTableError
impl Error for SectionTableError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl PartialEq for SectionTableError
impl PartialEq for SectionTableError
Source§fn eq(&self, other: &SectionTableError) -> bool
fn eq(&self, other: &SectionTableError) -> bool
self and other values to be equal, and is used by ==.impl Eq for SectionTableError
impl StructuralPartialEq for SectionTableError
Auto Trait Implementations§
impl Freeze for SectionTableError
impl RefUnwindSafe for SectionTableError
impl Send for SectionTableError
impl Sync for SectionTableError
impl Unpin for SectionTableError
impl UnsafeUnpin for SectionTableError
impl UnwindSafe for SectionTableError
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>,
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
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
§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
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
§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
§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>
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>
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