pub struct Mdl { /* private fields */ }Expand description
safe MDL wrapper with RAII cleanup
Implementations§
Source§impl Mdl
impl Mdl
Sourcepub fn create(virtual_address: *mut c_void, length: usize) -> KmResult<Self>
pub fn create(virtual_address: *mut c_void, length: usize) -> KmResult<Self>
create MDL for virtual address range
Sourcepub fn lock_pages(
&mut self,
access_mode: AccessMode,
operation: LockOperation,
) -> KmResult<()>
pub fn lock_pages( &mut self, access_mode: AccessMode, operation: LockOperation, ) -> KmResult<()>
lock pages in memory (for user-mode buffers)
Sourcepub fn system_address(&mut self) -> KmResult<NonNull<c_void>>
pub fn system_address(&mut self) -> KmResult<NonNull<c_void>>
get system address for MDL
Sourcepub fn byte_count(&self) -> u32
pub fn byte_count(&self) -> u32
get byte count
Sourcepub fn unlock_pages(&mut self)
pub fn unlock_pages(&mut self)
unlock pages
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Mdl
impl RefUnwindSafe for Mdl
impl !Send for Mdl
impl !Sync for Mdl
impl Unpin for Mdl
impl UnwindSafe for Mdl
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