pub struct CopyToWalker<'a, PTE, Mapper, Error>{
pub mapper: &'a mut Mapper,
pub offset: usize,
pub data: &'a [u8],
pub format: &'a PageFormat<'a, PTE>,
pub error: PhantomData<Error>,
}Expand description
The CopyToWalker struct is an implementation of a crate::walker::PageWalker used to
copy data to a given a virtual address range.
This is used by the AddressSpace::copy_to method.
Fields§
§mapper: &'a mut MapperThe page table mapper.
offset: usizeThe offset within the buffer.
data: &'a [u8]Storage for the data to copy.
format: &'a PageFormat<'a, PTE>The page format.
error: PhantomData<Error>A marker for Error.
Trait Implementations§
Source§impl<'a, PTE, Mapper, Error> PageWalker<PTE, Error> for CopyToWalker<'a, PTE, Mapper, Error>
impl<'a, PTE, Mapper, Error> PageWalker<PTE, Error> for CopyToWalker<'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>
Maps the page and copies the data from the buffer.
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 CopyToWalker<'a, PTE, Mapper, Error>
impl<'a, PTE, Mapper, Error> RefUnwindSafe for CopyToWalker<'a, PTE, Mapper, Error>
impl<'a, PTE, Mapper, Error> Send for CopyToWalker<'a, PTE, Mapper, Error>
impl<'a, PTE, Mapper, Error> Sync for CopyToWalker<'a, PTE, Mapper, Error>
impl<'a, PTE, Mapper, Error> Unpin for CopyToWalker<'a, PTE, Mapper, Error>where
Error: Unpin,
impl<'a, PTE, Mapper, Error> UnsafeUnpin for CopyToWalker<'a, PTE, Mapper, Error>
impl<'a, PTE, Mapper, Error> !UnwindSafe for CopyToWalker<'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