pub struct NativeFile { /* private fields */ }Expand description
Native file implementation using std::fs::File
Trait Implementations§
Source§impl StorageFile for NativeFile
impl StorageFile for NativeFile
Source§fn read_at(
&mut self,
offset: u64,
buf: &mut [u8],
) -> Result<usize, StorageError>
fn read_at( &mut self, offset: u64, buf: &mut [u8], ) -> Result<usize, StorageError>
Read data from the file at a specific offset Read more
Source§fn write_at(&mut self, offset: u64, buf: &[u8]) -> Result<usize, StorageError>
fn write_at(&mut self, offset: u64, buf: &[u8]) -> Result<usize, StorageError>
Write data to the file at a specific offset Read more
Source§fn sync_all(&mut self) -> Result<(), StorageError>
fn sync_all(&mut self) -> Result<(), StorageError>
Ensure all data is persisted to storage Read more
Auto Trait Implementations§
impl !Freeze for NativeFile
impl !RefUnwindSafe for NativeFile
impl Send for NativeFile
impl Sync for NativeFile
impl Unpin for NativeFile
impl UnwindSafe for NativeFile
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