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 !Freeze for ObfuscatedFileSystem
impl RefUnwindSafe for ObfuscatedFileSystem
impl Send for ObfuscatedFileSystem
impl Sync for ObfuscatedFileSystem
impl Unpin for ObfuscatedFileSystem
impl UnsafeUnpin 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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 more