pub enum OffsetValidationError<'a> {
OverlappingRange {
current: OffsetRange,
next: OffsetRange,
},
GapWithNonPaddingBytes {
before: OffsetRange,
after: OffsetRange,
gap_bytes: &'a [u8],
},
}Expand description
Unexpected cases while checking offset ranges that usually indicate some sort of error.
Variants§
OverlappingRange
Two ranges overlap.
The parser should only parse a byte range once? Overlaps indicate a struct size or array length is incorrect.
GapWithNonPaddingBytes
A byte between ranges is not zero.
Non padding bytes between ranges are likely missed data.
Trait Implementations§
Source§impl<'a> Debug for OffsetValidationError<'a>
impl<'a> Debug for OffsetValidationError<'a>
Source§impl<'a> PartialEq for OffsetValidationError<'a>
impl<'a> PartialEq for OffsetValidationError<'a>
impl<'a> Eq for OffsetValidationError<'a>
impl<'a> StructuralPartialEq for OffsetValidationError<'a>
Auto Trait Implementations§
impl<'a> Freeze for OffsetValidationError<'a>
impl<'a> RefUnwindSafe for OffsetValidationError<'a>
impl<'a> Send for OffsetValidationError<'a>
impl<'a> Sync for OffsetValidationError<'a>
impl<'a> Unpin for OffsetValidationError<'a>
impl<'a> UnwindSafe for OffsetValidationError<'a>
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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