#[non_exhaustive]pub enum ErrorKind {
Truncated,
Malformed,
Unsupported,
OutOfRange,
RecursionLimit,
InvalidUtf8,
InvalidPrefixTarget,
UnknownOpcode,
}Expand description
The classification of a decoding failure.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Truncated
The input ended before the structure being decoded was complete.
Malformed
The bytes were present but do not form a legal structure.
Unsupported
The structure is legal but this version of the crate does not decode it.
OutOfRange
An index, RVA, or offset pointed outside the region it must lie in.
RecursionLimit
A nested structure exceeded the configured recursion limit.
InvalidUtf8
Text that must be UTF-8 was not.
InvalidPrefixTarget
A CIL prefix was not followed by an instruction it is legal on.
UnknownOpcode
The byte (or 0xFE-escaped byte pair) is not a defined CIL opcode.
Implementations§
Trait Implementations§
impl Copy for ErrorKind
impl Eq for ErrorKind
Source§impl Ord for ErrorKind
impl Ord for ErrorKind
1.21.0 (const: unstable) · 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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for ErrorKind
impl PartialOrd for ErrorKind
impl StructuralPartialEq for ErrorKind
Auto Trait Implementations§
impl Forget for ErrorKind
impl Freeze for ErrorKind
impl Move for ErrorKind
impl RefUnwindSafe for ErrorKind
impl Send for ErrorKind
impl Sync for ErrorKind
impl Unpin for ErrorKind
impl UnsafeUnpin for ErrorKind
impl UnwindSafe for ErrorKind
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