pub trait CodeFault: Context {
    // Required methods
    fn is_user_mode(&self) -> bool;
    fn instruction_ptr(&self) -> VAddr;
    fn fault_kind(&self) -> &'static str;

    // Provided method
    fn details(&self) -> Option<&dyn Display> { ... }
}
Expand description

Trait representing a fault caused by the currently executing code.

Required Methods§

source

fn is_user_mode(&self) -> bool

Returns true if the code fault occurred while executing in user mode code.

source

fn instruction_ptr(&self) -> VAddr

Returns the virtual address of the instruction pointer where the fault occurred.

source

fn fault_kind(&self) -> &'static str

Returns a static string describing the kind of code fault.

Provided Methods§

source

fn details(&self) -> Option<&dyn Display>

Returns a dynamically formatted message if additional information about the fault is available. Otherwise, this returns None.

Default Implementation

Returns None.

Implementors§