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§
source§impl ObfuscatedFileSystem
impl ObfuscatedFileSystem
pub fn file_count(&self) -> usize
Trait Implementations§
source§impl Default for ObfuscatedFileSystem
impl Default for ObfuscatedFileSystem
source§impl 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, perm: Permission ) -> 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<()>
source§fn 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.fn new_reader(&self, handle: Arc<Self::Handle>) -> IoResult<Self::Reader>
fn new_writer(&self, handle: Arc<Self::Handle>) -> IoResult<Self::Writer>
fn reuse_and_open<P: AsRef<Path>>( &self, src_path: P, dst_path: P ) -> Result<Self::Handle>
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§
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