pub struct MockFileSystem { /* private fields */ }Implementations§
Source§impl MockFileSystem
impl MockFileSystem
pub fn new() -> Self
pub fn add_file( &self, path: impl Into<PathBuf>, content: Vec<u8>, modified: SystemTime, )
pub fn add_directory(&self, path: impl Into<PathBuf>)
pub fn get_file_content(&self, path: &Path) -> Option<Vec<u8>>
pub fn list_all_files(&self) -> Vec<PathBuf>
Trait Implementations§
Source§impl Clone for MockFileSystem
impl Clone for MockFileSystem
Source§fn clone(&self) -> MockFileSystem
fn clone(&self) -> MockFileSystem
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MockFileSystem
impl Debug for MockFileSystem
Source§impl FileSystem for MockFileSystem
impl FileSystem for MockFileSystem
fn list_directory(&self, path: &Path) -> Result<Vec<EntryMetadata>>
fn get_metadata(&self, path: &Path) -> Result<EntryMetadata>
fn copy_file(&self, from: &Path, to: &Path) -> Result<()>
fn create_directory(&self, path: &Path) -> Result<()>
fn exists(&self, path: &Path) -> Result<bool>
fn set_modified_time(&self, path: &Path, time: SystemTime) -> Result<()>
Auto Trait Implementations§
impl Freeze for MockFileSystem
impl RefUnwindSafe for MockFileSystem
impl Send for MockFileSystem
impl Sync for MockFileSystem
impl Unpin for MockFileSystem
impl UnsafeUnpin for MockFileSystem
impl UnwindSafe for MockFileSystem
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