pub enum TranslateResult {
Mapped {
frame: MappedFrame,
offset: u64,
flags: PageTableFlags,
},
NotMapped,
InvalidFrameAddress(PhysAddr),
}
Expand description
The return value of the Translate::translate
function.
If the given address has a valid mapping, a Frame4KiB
, Frame2MiB
, or Frame1GiB
variant
is returned, depending on the size of the mapped page. The remaining variants indicate errors.
Variants§
Mapped
The virtual address is mapped to a physical frame.
Fields
§
frame: MappedFrame
The mapped frame.
§
flags: PageTableFlags
The entry flags in the lowest-level page table.
Flags of higher-level page table entries are not included here, but they can still affect the effective flags for an address, for example when the WRITABLE flag is not set for a level 3 entry.
NotMapped
The given virtual address is not mapped to a physical frame.
InvalidFrameAddress(PhysAddr)
The page table entry for the given virtual address points to an invalid physical address.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TranslateResult
impl RefUnwindSafe for TranslateResult
impl Send for TranslateResult
impl Sync for TranslateResult
impl Unpin for TranslateResult
impl UnwindSafe for TranslateResult
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