pub struct Mapper {
ptr: *mut (),
pte: &'static mut Pte,
}
Fields§
§ptr: *mut ()
§pte: &'static mut Pte
Implementations§
Source§impl Mapper
impl Mapper
Sourcepub unsafe fn new(index: usize) -> Self
pub unsafe fn new(index: usize) -> Self
§Safety
The caller must ensure there is only one Mapper
for a given
index
at a time.
Sourcepub unsafe fn map<T>(&mut self, pa: u64) -> TemporaryMap<'_, T>
pub unsafe fn map<T>(&mut self, pa: u64) -> TemporaryMap<'_, T>
Maps the given physical address into virtual address space for the lifetime of the return value.
pa
must be page aligned.
§Safety
The caller must ensure that the object being mapped is a valid T
before they dereference it.
Auto Trait Implementations§
impl Freeze for Mapper
impl RefUnwindSafe for Mapper
impl !Send for Mapper
impl !Sync for Mapper
impl Unpin for Mapper
impl !UnwindSafe for Mapper
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