pub struct OsFs;Expand description
The operating system’s filesystem. No test can see whether a sync reached the disk without cutting power, so Store’s crash tests use the crash filesystem’s model of syncing instead.
Trait Implementations§
Source§impl Fs for OsFs
impl Fs for OsFs
Source§fn write_new(&self, path: &Path, data: &[u8]) -> Result<()>
fn write_new(&self, path: &Path, data: &[u8]) -> Result<()>
Creates a file that must not exist yet and writes
data to it,
without syncing.Source§fn rename(&self, from: &Path, to: &Path) -> Result<()>
fn rename(&self, from: &Path, to: &Path) -> Result<()>
Renames a file, replacing any file at
to.Source§fn sync_dir(&self, dir: &Path) -> Result<()>
fn sync_dir(&self, dir: &Path) -> Result<()>
Makes a directory’s entries durable: files created, renamed or
removed in it.
Auto Trait Implementations§
impl Freeze for OsFs
impl RefUnwindSafe for OsFs
impl Send for OsFs
impl Sync for OsFs
impl Unpin for OsFs
impl UnsafeUnpin for OsFs
impl UnwindSafe for OsFs
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