pub struct Mmap { /* private fields */ }
Implementations§
Source§impl Mmap
impl Mmap
pub unsafe fn map( address: *mut c_void, length: usize, protection: c_uint, flags: c_uint, fd: Option<FdRef<'_>>, offset: c_ulong, ) -> Result<Self, Error>
pub fn unmap(self) -> Result<(), Error>
pub fn as_ptr(&self) -> *const c_void
pub fn as_mut_ptr(&self) -> *mut c_void
pub fn as_slice(&self) -> &[u8]
pub fn as_slice_mut(&mut self) -> &mut [u8]
pub fn len(&self) -> usize
Trait Implementations§
Auto Trait Implementations§
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