pub struct DiskIO { /* private fields */ }Implementations§
Source§impl DiskIO
impl DiskIO
pub fn new(file: Arc<File>, use_direct_io: bool) -> Result<Self>
pub fn read_sectors_sync(&self, sector: u64, count: u64) -> Result<Vec<u8>>
pub fn write_sectors_sync(&self, sector: u64, data: &[u8]) -> Result<()>
pub fn flush(&self) -> Result<()>
Sourcepub fn batch_write(&mut self, writes: Vec<(u64, Vec<u8>)>) -> Result<()>
pub fn batch_write(&mut self, writes: Vec<(u64, Vec<u8>)>) -> Result<()>
Batch write with io_uring for better throughput Operations complete synchronously before returning
pub fn read_metadata(&self) -> Result<Vec<u8>>
pub fn write_metadata(&self, metadata: &[u8]) -> Result<()>
Auto Trait Implementations§
impl Freeze for DiskIO
impl RefUnwindSafe for DiskIO
impl Send for DiskIO
impl Sync for DiskIO
impl Unpin for DiskIO
impl UnsafeUnpin for DiskIO
impl UnwindSafe for DiskIO
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