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§
impl Copy for OsFs
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. Read moreSource§fn rename(&self, from: &Path, to: &Path) -> Result<()>
fn rename(&self, from: &Path, to: &Path) -> Result<()>
Renames a file, replacing any file at
to. Read moreSource§fn rename_new(&self, from: &Path, to: &Path) -> Result<()>
fn rename_new(&self, from: &Path, to: &Path) -> Result<()>
Renames a file only if nothing has the name
to, in one step: of
two callers renaming onto one name, one is refused. Read moreSource§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. Read more
Source§fn list(&self, dir: &Path) -> Result<Vec<OsString>>
fn list(&self, dir: &Path) -> Result<Vec<OsString>>
The names in a directory, sorted. Read more
Auto Trait Implementations§
impl Forget for OsFs
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.