pub struct StdVfs;Expand description
Standard-library-backed production filesystem.
Trait Implementations§
impl Copy for StdVfs
Source§impl Vfs for StdVfs
impl Vfs for StdVfs
Source§fn ensure_directory(&self, path: &Path, create: bool) -> Result<bool>
fn ensure_directory(&self, path: &Path, create: bool) -> Result<bool>
Admits a store directory, creating missing ancestors when requested,
and reports whether the resulting path is a directory.
Source§fn open(&self, path: &Path) -> Result<u64>
fn open(&self, path: &Path) -> Result<u64>
Opens an existing path and returns its byte length.
Source§fn open_for_map(&self, path: &Path) -> Result<File>
fn open_for_map(&self, path: &Path) -> Result<File>
Opens an existing path as an owned file suitable for memory mapping. Read more
Source§fn read_range(&self, path: &Path, offset: u64, length: usize) -> Result<Vec<u8>>
fn read_range(&self, path: &Path, offset: u64, length: usize) -> Result<Vec<u8>>
Reads at most
length bytes beginning at offset.Source§fn write(&self, path: &Path, bytes: &[u8]) -> Result<()>
fn write(&self, path: &Path, bytes: &[u8]) -> Result<()>
Creates or truncates a file and writes all bytes.
Source§fn open_append(&self, path: &Path) -> Result<Box<dyn VfsFile>>
fn open_append(&self, path: &Path) -> Result<Box<dyn VfsFile>>
Opens or creates one file for handle-oriented append-only writes.
Source§fn rename(&self, from: &Path, to: &Path) -> Result<()>
fn rename(&self, from: &Path, to: &Path) -> Result<()>
Atomically renames one path over another according to platform semantics.
Source§fn sync(&self, path: &Path, kind: SyncKind) -> Result<()>
fn sync(&self, path: &Path, kind: SyncKind) -> Result<()>
Synchronizes a file or directory using an explicit platform primitive.
Auto Trait Implementations§
impl Freeze for StdVfs
impl RefUnwindSafe for StdVfs
impl Send for StdVfs
impl Sync for StdVfs
impl Unpin for StdVfs
impl UnsafeUnpin for StdVfs
impl UnwindSafe for StdVfs
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