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§
sourcefn is_user_mode(&self) -> bool
fn is_user_mode(&self) -> bool
Returns true
if the code fault occurred while executing in user
mode code.
sourcefn instruction_ptr(&self) -> VAddr
fn instruction_ptr(&self) -> VAddr
Returns the virtual address of the instruction pointer where the fault occurred.
sourcefn fault_kind(&self) -> &'static str
fn fault_kind(&self) -> &'static str
Returns a static string describing the kind of code fault.
Provided Methods§
sourcefn details(&self) -> Option<&dyn Display>
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
.