pub enum ExecutionError<Address, I, Custom> {
UnalignedInstructionFetch {
address: Address,
},
ProgramCounter(ProgramCounterError<Address, Custom>),
MemoryAccess(VirtualMemoryError),
UnsupportedInstruction {
address: Address,
instruction: I,
},
UnimpInstruction {
address: Address,
},
InvalidInstruction {
address: Address,
instruction: u32,
},
Custom(Custom),
}Expand description
Execution errors
Variants§
UnalignedInstructionFetch
Unaligned instruction fetch
Fields
§
address: AddressAddress of the unaligned instruction fetch
ProgramCounter(ProgramCounterError<Address, Custom>)
Program counter error
MemoryAccess(VirtualMemoryError)
Memory access error
UnsupportedInstruction
Unsupported instruction
Fields
§
address: AddressAddress of the unsupported instruction
§
instruction: IInstruction that caused the error
UnimpInstruction
Unimplemented/illegal instruction
Fields
§
address: AddressAddress of the unimp instruction
InvalidInstruction
Invalid instruction
Fields
§
address: AddressAddress of the invalid instruction
Custom(Custom)
Custom error
Implementations§
Source§impl<Address, BI, Custom> ExecutionError<Address, BI, Custom>
impl<Address, BI, Custom> ExecutionError<Address, BI, Custom>
Sourcepub fn map_instruction<I>(
self,
map: fn(BI) -> I,
) -> ExecutionError<Address, I, Custom>
pub fn map_instruction<I>( self, map: fn(BI) -> I, ) -> ExecutionError<Address, I, Custom>
Map instruction type
Trait Implementations§
Source§impl<Address, I, Custom> Display for ExecutionError<Address, I, Custom>
impl<Address, I, Custom> Display for ExecutionError<Address, I, Custom>
Source§impl<Address, I, Custom> Error for ExecutionError<Address, I, Custom>
impl<Address, I, Custom> Error for ExecutionError<Address, I, 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<Address, I, Custom> From<ProgramCounterError<Address, Custom>> for ExecutionError<Address, I, Custom>
impl<Address, I, Custom> From<ProgramCounterError<Address, Custom>> for ExecutionError<Address, I, Custom>
Source§fn from(source: ProgramCounterError<Address, Custom>) -> Self
fn from(source: ProgramCounterError<Address, Custom>) -> Self
Converts to this type from the input type.
Source§impl<Address, I, Custom> From<VirtualMemoryError> for ExecutionError<Address, I, Custom>
impl<Address, I, Custom> From<VirtualMemoryError> for ExecutionError<Address, I, Custom>
Source§fn from(source: VirtualMemoryError) -> Self
fn from(source: VirtualMemoryError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<Address, I, Custom> Freeze for ExecutionError<Address, I, Custom>
impl<Address, I, Custom> RefUnwindSafe for ExecutionError<Address, I, Custom>
impl<Address, I, Custom> Send for ExecutionError<Address, I, Custom>
impl<Address, I, Custom> Sync for ExecutionError<Address, I, Custom>
impl<Address, I, Custom> Unpin for ExecutionError<Address, I, Custom>
impl<Address, I, Custom> UnwindSafe for ExecutionError<Address, I, Custom>
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