Struct raft_engine::env::DefaultFileSystem
source · [−]pub struct DefaultFileSystem;Trait Implementations
sourceimpl FileSystem for DefaultFileSystem
impl FileSystem for DefaultFileSystem
type Handle = LogFd
type Reader = LogFile
type Writer = LogFile
fn create<P: AsRef<Path>>(&self, path: P) -> IoResult<Self::Handle>
fn open<P: AsRef<Path>>(&self, path: P) -> IoResult<Self::Handle>
fn delete<P: AsRef<Path>>(&self, path: P) -> IoResult<()>
fn rename<P: AsRef<Path>>(&self, src_path: P, dst_path: P) -> IoResult<()>
fn new_reader(&self, handle: Arc<Self::Handle>) -> IoResult<Self::Reader>
fn new_writer(&self, handle: Arc<Self::Handle>) -> IoResult<Self::Writer>
sourcefn reuse<P: AsRef<Path>>(&self, src_path: P, dst_path: P) -> Result<()>
fn reuse<P: AsRef<Path>>(&self, src_path: P, dst_path: P) -> Result<()>
Reuses file at src_path as a new file at dst_path. The default
implementation simply renames the file. Read more
sourcefn delete_metadata<P: AsRef<Path>>(&self, _path: P) -> Result<()>
fn delete_metadata<P: AsRef<Path>>(&self, _path: P) -> Result<()>
Deletes user implemented metadata associated with path. Returns
true if any metadata is deleted. Read more
sourcefn exists_metadata<P: AsRef<Path>>(&self, _path: P) -> bool
fn exists_metadata<P: AsRef<Path>>(&self, _path: P) -> bool
Returns whether there is any user metadata associated with given path.
Auto Trait Implementations
impl RefUnwindSafe for DefaultFileSystem
impl Send for DefaultFileSystem
impl Sync for DefaultFileSystem
impl Unpin for DefaultFileSystem
impl UnwindSafe for DefaultFileSystem
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more