pub struct MmapRegion { /* private fields */ }
Implementations§
Source§impl MmapRegion
impl MmapRegion
pub fn new( path: &str, offset: usize, size: usize, ) -> Result<Self, Box<dyn Error>>
pub fn new_with_flag( path: &str, offset: usize, size: usize, flag: i32, ) -> Result<Self, Box<dyn Error>>
pub fn write(&mut self, data: &[u8]) -> Result<usize, Box<dyn Error>>
pub fn read(&mut self, buf: &mut [u8]) -> Result<usize, Box<dyn Error>>
pub fn poll(&self, timeout_ms: i32) -> Result<bool, Box<dyn Error>>
Trait Implementations§
Source§impl Clone for MmapRegion
impl Clone for MmapRegion
Source§impl Debug for MmapRegion
impl Debug for MmapRegion
Auto Trait Implementations§
impl Freeze for MmapRegion
impl RefUnwindSafe for MmapRegion
impl Send for MmapRegion
impl Sync for MmapRegion
impl Unpin for MmapRegion
impl UnwindSafe for MmapRegion
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