pub enum ExecuteError<Instruction, Custom>{
UnalignedInstructionFetch {
address: u64,
},
MemoryAccess(VirtualMemoryError),
UnsupportedInstruction {
address: u64,
instruction: Instruction,
},
UnimpInstruction {
address: u64,
},
InvalidInstruction {
address: u64,
instruction: u32,
},
Custom(Custom),
}Expand description
Execution errors
Variants§
UnalignedInstructionFetch
Unaligned instruction fetch
MemoryAccess(VirtualMemoryError)
Memory access error
UnsupportedInstruction
Unsupported instruction
Fields
§
instruction: InstructionInstruction that caused the error
UnimpInstruction
Unimplemented/illegal instruction
InvalidInstruction
Invalid instruction
Fields
Custom(Custom)
Custom error
Implementations§
Source§impl<BaseInstruction, Custom> ExecuteError<BaseInstruction, Custom>where
BaseInstruction: GenericBaseInstruction,
Custom: Display,
impl<BaseInstruction, Custom> ExecuteError<BaseInstruction, Custom>where
BaseInstruction: GenericBaseInstruction,
Custom: Display,
Sourcepub fn map_from_base<Instruction>(self) -> ExecuteError<Instruction, Custom>where
Instruction: GenericBaseInstruction<Base = BaseInstruction>,
pub fn map_from_base<Instruction>(self) -> ExecuteError<Instruction, Custom>where
Instruction: GenericBaseInstruction<Base = BaseInstruction>,
Map instruction type from lower-level base instruction
Trait Implementations§
Source§impl<Instruction, Custom> Debug for ExecuteError<Instruction, Custom>
impl<Instruction, Custom> Debug for ExecuteError<Instruction, Custom>
Source§impl<Instruction, Custom> Display for ExecuteError<Instruction, Custom>
impl<Instruction, Custom> Display for ExecuteError<Instruction, Custom>
Source§impl<Instruction, Custom> Error for ExecuteError<Instruction, Custom>
impl<Instruction, Custom> Error for ExecuteError<Instruction, Custom>
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl<Instruction, Custom> From<VirtualMemoryError> for ExecuteError<Instruction, Custom>
impl<Instruction, Custom> From<VirtualMemoryError> for ExecuteError<Instruction, Custom>
Source§fn from(source: VirtualMemoryError) -> Self
fn from(source: VirtualMemoryError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<Instruction, Custom> Freeze for ExecuteError<Instruction, Custom>
impl<Instruction, Custom> RefUnwindSafe for ExecuteError<Instruction, Custom>where
Instruction: RefUnwindSafe,
Custom: RefUnwindSafe,
impl<Instruction, Custom> Send for ExecuteError<Instruction, Custom>
impl<Instruction, Custom> Sync for ExecuteError<Instruction, Custom>
impl<Instruction, Custom> Unpin for ExecuteError<Instruction, Custom>
impl<Instruction, Custom> UnwindSafe for ExecuteError<Instruction, Custom>where
Instruction: UnwindSafe,
Custom: UnwindSafe,
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