pub struct MemFault {
pub kind: FaultKind,
pub addr: u64,
}Expand description
A failed access, with the exact byte that failed rather than the start of the
access. A 8-byte read straddling a mapping boundary faults at the boundary,
and that address is what a guest fault handler would see in CR2.
Fields§
§kind: FaultKind§addr: u64Implementations§
Source§impl MemFault
impl MemFault
Sourcepub fn is_write(&self) -> bool
pub fn is_write(&self) -> bool
Whether the access that took this fault was a write.
Kept beside the kinds rather than at the consumer: a backend turning a fault back into the interpreter’s error type needs the distinction, and a second copy of this match would drift the first time a kind is added.
Trait Implementations§
impl Copy for MemFault
impl Eq for MemFault
Source§impl Error for MemFault
impl Error for MemFault
1.30.0 · 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()
impl StructuralPartialEq for MemFault
Auto Trait Implementations§
impl Freeze for MemFault
impl RefUnwindSafe for MemFault
impl Send for MemFault
impl Sync for MemFault
impl Unpin for MemFault
impl UnsafeUnpin for MemFault
impl UnwindSafe for MemFault
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