Struct raft_engine::env::ObfuscatedFileSystem
source · [−]pub struct ObfuscatedFileSystem { /* private fields */ }Expand description
[ObfuscatedFileSystem] is a special implementation of [FileSystem],
which is used for constructing and simulating an abnormal file system for
[Read] and [Write].
Implementations
sourceimpl ObfuscatedFileSystem
impl ObfuscatedFileSystem
pub fn file_count(&self) -> usize
Trait Implementations
sourceimpl Default for ObfuscatedFileSystem
impl Default for ObfuscatedFileSystem
sourceimpl FileSystem for ObfuscatedFileSystem
impl FileSystem for ObfuscatedFileSystem
type Handle = <DefaultFileSystem as FileSystem>::Handle
type Reader = ObfuscatedReader
type Writer = ObfuscatedWriter
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<()>
sourcefn reuse<P: AsRef<Path>>(&self, src_path: P, dst_path: P) -> IoResult<()>
fn reuse<P: AsRef<Path>>(&self, src_path: P, dst_path: P) -> IoResult<()>
Reuses file at src_path as a new file at dst_path. The default
implementation simply renames the file. Read more
fn new_reader(&self, handle: Arc<Self::Handle>) -> IoResult<Self::Reader>
fn new_writer(&self, handle: Arc<Self::Handle>) -> IoResult<Self::Writer>
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 ObfuscatedFileSystem
impl Send for ObfuscatedFileSystem
impl Sync for ObfuscatedFileSystem
impl Unpin for ObfuscatedFileSystem
impl UnwindSafe for ObfuscatedFileSystem
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