pub struct RawIo { /* private fields */ }Expand description
Raw device I/O for Linux OS.
Trait Implementations§
Source§impl Drop for RawIoLinux
impl Drop for RawIoLinux
Source§impl RawIoOsIntf for RawIoLinux
impl RawIoOsIntf for RawIoLinux
Source§fn new(path: &Path, create: bool, read: bool, write: bool) -> Result<Self>
fn new(path: &Path, create: bool, read: bool, write: bool) -> Result<Self>
Open a file or device.
Source§fn get_sector_size(&self) -> Option<u32>
fn get_sector_size(&self) -> Option<u32>
Get the physical sector size of the file or device.
Returns None, if this is not a raw device.
Source§fn drop_file_caches(&mut self, offset: u64, size: u64) -> Result<()>
fn drop_file_caches(&mut self, offset: u64, size: u64) -> Result<()>
Close the file, flush all buffers and drop all caches.
This function ensures that subsequent reads are not read from RAM cache.
Source§fn close(&mut self) -> Result<()>
fn close(&mut self) -> Result<()>
Close the file and flush all buffers.
(This does not affect the caches).
Auto Trait Implementations§
impl Freeze for RawIoLinux
impl RefUnwindSafe for RawIoLinux
impl Send for RawIoLinux
impl Sync for RawIoLinux
impl Unpin for RawIoLinux
impl UnwindSafe for RawIoLinux
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