#[repr(transparent)]pub struct PageFaultError(u32);
Expand description
Error code for page faults
Tuple Fields§
§0: u32
Implementations§
source§impl PageFaultError
impl PageFaultError
const PROTECTION_BITS: usize = 1usize
const PROTECTION_OFFSET: usize = 0usize
sourcepub const fn protection(&self) -> bool
pub const fn protection(&self) -> bool
If this flag is set, the page fault was caused by a page-protection violation, else the page fault was caused by a not-present page.
Bits: 0..1
sourcepub const fn with_protection(self, value: bool) -> Self
pub const fn with_protection(self, value: bool) -> Self
If this flag is set, the page fault was caused by a page-protection violation, else the page fault was caused by a not-present page.
Bits: 0..1
sourcepub fn set_protection(&mut self, value: bool)
pub fn set_protection(&mut self, value: bool)
If this flag is set, the page fault was caused by a page-protection violation, else the page fault was caused by a not-present page.
Bits: 0..1
const WRITE_BITS: usize = 1usize
const WRITE_OFFSET: usize = 1usize
sourcepub const fn write(&self) -> bool
pub const fn write(&self) -> bool
If this flag is set, the memory access that caused the page fault was a write. Else the access that caused the page fault is a memory read. This bit does not necessarily indicate the cause of the page fault was a read or write violation.
Bits: 1..2
sourcepub const fn with_write(self, value: bool) -> Self
pub const fn with_write(self, value: bool) -> Self
If this flag is set, the memory access that caused the page fault was a write. Else the access that caused the page fault is a memory read. This bit does not necessarily indicate the cause of the page fault was a read or write violation.
Bits: 1..2
sourcepub fn set_write(&mut self, value: bool)
pub fn set_write(&mut self, value: bool)
If this flag is set, the memory access that caused the page fault was a write. Else the access that caused the page fault is a memory read. This bit does not necessarily indicate the cause of the page fault was a read or write violation.
Bits: 1..2
const USER_BITS: usize = 1usize
const USER_OFFSET: usize = 2usize
sourcepub const fn user(&self) -> bool
pub const fn user(&self) -> bool
If this flag is set, an access in user mode (CPL=3) caused the page fault. Else an access in supervisor mode (CPL=0, 1, or 2) caused the page fault. This bit does not necessarily indicate the cause of the page fault was a privilege violation.
Bits: 2..3
sourcepub const fn with_user(self, value: bool) -> Self
pub const fn with_user(self, value: bool) -> Self
If this flag is set, an access in user mode (CPL=3) caused the page fault. Else an access in supervisor mode (CPL=0, 1, or 2) caused the page fault. This bit does not necessarily indicate the cause of the page fault was a privilege violation.
Bits: 2..3
sourcepub fn set_user(&mut self, value: bool)
pub fn set_user(&mut self, value: bool)
If this flag is set, an access in user mode (CPL=3) caused the page fault. Else an access in supervisor mode (CPL=0, 1, or 2) caused the page fault. This bit does not necessarily indicate the cause of the page fault was a privilege violation.
Bits: 2..3
const TABLE_BITS: usize = 1usize
const TABLE_OFFSET: usize = 3usize
sourcepub const fn table(&self) -> bool
pub const fn table(&self) -> bool
If this flag is set, the page fault is a result of the processor reading a 1 from a reserved field within a page-translation-table entry.
Bits: 3..4
sourcepub const fn with_table(self, value: bool) -> Self
pub const fn with_table(self, value: bool) -> Self
If this flag is set, the page fault is a result of the processor reading a 1 from a reserved field within a page-translation-table entry.
Bits: 3..4
sourcepub fn set_table(&mut self, value: bool)
pub fn set_table(&mut self, value: bool)
If this flag is set, the page fault is a result of the processor reading a 1 from a reserved field within a page-translation-table entry.
Bits: 3..4
const INSTRUCTION_BITS: usize = 1usize
const INSTRUCTION_OFFSET: usize = 4usize
sourcepub const fn instruction(&self) -> bool
pub const fn instruction(&self) -> bool
If this flag is set, it indicates that the access that caused the page fault was an instruction fetch.
Bits: 4..5
sourcepub const fn with_instruction(self, value: bool) -> Self
pub const fn with_instruction(self, value: bool) -> Self
If this flag is set, it indicates that the access that caused the page fault was an instruction fetch.
Bits: 4..5
sourcepub fn set_instruction(&mut self, value: bool)
pub fn set_instruction(&mut self, value: bool)
If this flag is set, it indicates that the access that caused the page fault was an instruction fetch.
Bits: 4..5
Trait Implementations§
source§impl Clone for PageFaultError
impl Clone for PageFaultError
source§fn clone(&self) -> PageFaultError
fn clone(&self) -> PageFaultError
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more