#[non_exhaustive]pub enum Error {
Show 15 variants
InvalidMachineMode,
InvalidStackWidth,
DecodeFailed(DecodeError),
EncodeFailed(EncodeError),
IncompleteInstruction {
needed: usize,
},
InsufficientBytes,
InstructionTooLong,
InvalidEncoding,
BufferTooSmall,
InvalidOperand,
NotYetImplemented(&'static str),
UndefinedInstruction {
opcode: u8,
reason: UndefinedReason,
},
InvalidPrefixCombination {
prefixes: &'static str,
},
EvexEncodingError {
kind: EvexErrorKind,
},
ModeNotSupported {
mode: &'static str,
feature: &'static str,
},
}Expand description
Main error type
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.
InvalidMachineMode
Invalid machine mode
InvalidStackWidth
Invalid stack width
DecodeFailed(DecodeError)
Failed to decode instruction
EncodeFailed(EncodeError)
Encoding failed
IncompleteInstruction
Incomplete instruction (need more bytes)
InsufficientBytes
Not enough bytes to decode
InstructionTooLong
Instruction exceeds maximum length (15 bytes)
InvalidEncoding
Invalid instruction encoding
BufferTooSmall
Buffer too small
InvalidOperand
Invalid operand
NotYetImplemented(&'static str)
Feature not implemented yet
UndefinedInstruction
Undefined or reserved instruction
Fields
§
reason: UndefinedReasonOptional description of why it’s undefined
InvalidPrefixCombination
Invalid prefix combination
EvexEncodingError
EVEX encoding error (AVX-512 specific)
Fields
§
kind: EvexErrorKindSpecific EVEX error type
ModeNotSupported
Instruction not supported in current mode
Trait Implementations§
impl Eq for Error
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl UnwindSafe for Error
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