pub struct PteReader<'a, PTE, Mapper, Error>{
pub mapper: &'a Mapper,
pub pte: Option<PTE>,
pub error: PhantomData<Error>,
}Expand description
The PteReader struct is an implementation of a crate::walker::PageWalker used to
retrieve the PTE for a given virtual address, which is used by the AddressSpace::read_pte
method.
Fields§
§mapper: &'a MapperThe page table mapper.
pte: Option<PTE>Storage for the retrieved PTE.
error: PhantomData<Error>A marker for Error.
Trait Implementations§
Source§impl<'a, PTE, Mapper, Error> PageWalker<PTE, Error> for PteReader<'a, PTE, Mapper, Error>
impl<'a, PTE, Mapper, Error> PageWalker<PTE, Error> for PteReader<'a, PTE, Mapper, Error>
Source§fn read_pte(&self, phys_addr: PTE) -> Result<PTE, Error>
fn read_pte(&self, phys_addr: PTE) -> Result<PTE, Error>
Reads the PTE at the given physical address.
Source§fn handle_pte(
&mut self,
pte_type: PteType,
_range: Range<usize>,
pte: &PTE,
) -> Result<(), Error>
fn handle_pte( &mut self, pte_type: PteType, _range: Range<usize>, pte: &PTE, ) -> Result<(), Error>
Stores the PTE of the page, if the virtual address resolves to a page.
Source§fn handle_pte_hole(
&mut self,
_level: usize,
_range: Range<usize>,
_pte: &PTE,
) -> Result<(), Error>
fn handle_pte_hole( &mut self, _level: usize, _range: Range<usize>, _pte: &PTE, ) -> Result<(), Error>
This callback handles a PTE hole, i.e. a PTE that is not marked as present, and is given
the level, the virtual address range and an immutable reference to the PTE. The
implementation of this callback is optional.
Source§fn handle_post_pte(
&mut self,
_level: usize,
_range: Range<usize>,
_pte: &PTE,
) -> Result<(), Error>
fn handle_post_pte( &mut self, _level: usize, _range: Range<usize>, _pte: &PTE, ) -> Result<(), Error>
This callback handles the PTE of a page table after recursing the page table hierarchy, and
is given the level, the virtual address and an immutable reference to the PTE. The
implementation of this callback is optional.
Auto Trait Implementations§
impl<'a, PTE, Mapper, Error> Freeze for PteReader<'a, PTE, Mapper, Error>where
PTE: Freeze,
impl<'a, PTE, Mapper, Error> RefUnwindSafe for PteReader<'a, PTE, Mapper, Error>
impl<'a, PTE, Mapper, Error> Send for PteReader<'a, PTE, Mapper, Error>
impl<'a, PTE, Mapper, Error> Sync for PteReader<'a, PTE, Mapper, Error>
impl<'a, PTE, Mapper, Error> Unpin for PteReader<'a, PTE, Mapper, Error>
impl<'a, PTE, Mapper, Error> UnsafeUnpin for PteReader<'a, PTE, Mapper, Error>where
PTE: UnsafeUnpin,
impl<'a, PTE, Mapper, Error> UnwindSafe for PteReader<'a, PTE, Mapper, Error>
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