pub struct InMemoryFileSystem {
pub files: Arc<RwLock<HashMap<OsString, InMemoryFile>>>,
}
Fields§
§files: Arc<RwLock<HashMap<OsString, InMemoryFile>>>
Implementations§
Source§impl InMemoryFileSystem
impl InMemoryFileSystem
pub fn new(files: HashMap<OsString, InMemoryFile>) -> Self
Trait Implementations§
Source§impl Clone for InMemoryFileSystem
impl Clone for InMemoryFileSystem
Source§fn clone(&self) -> InMemoryFileSystem
fn clone(&self) -> InMemoryFileSystem
Returns a copy of the value. Read more
1.0.0 · 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 InMemoryFileSystem
impl Debug for InMemoryFileSystem
Source§impl Default for InMemoryFileSystem
impl Default for InMemoryFileSystem
Source§fn default() -> InMemoryFileSystem
fn default() -> InMemoryFileSystem
Returns the “default value” for a type. Read more
Source§impl FileSystem for InMemoryFileSystem
impl FileSystem for InMemoryFileSystem
fn create_dir<'life0, 'async_trait, P>( &'life0 self, path: P, ) -> Pin<Box<dyn Future<Output = FileSystemResult<()>> + Send + 'async_trait>>
fn create_dir_all<'life0, 'async_trait, P>( &'life0 self, path: P, ) -> Pin<Box<dyn Future<Output = FileSystemResult<()>> + Send + 'async_trait>>
fn read<'life0, 'async_trait, P>( &'life0 self, path: P, ) -> Pin<Box<dyn Future<Output = FileSystemResult<Vec<u8>>> + Send + 'async_trait>>
fn read_to_string<'life0, 'async_trait, P>( &'life0 self, path: P, ) -> Pin<Box<dyn Future<Output = FileSystemResult<String>> + Send + 'async_trait>>
fn write<'life0, 'async_trait, P, C>( &'life0 self, path: P, contents: C, ) -> Pin<Box<dyn Future<Output = FileSystemResult<()>> + Send + 'async_trait>>
fn append<'life0, 'async_trait, P, C>( &'life0 self, path: P, contents: C, ) -> Pin<Box<dyn Future<Output = FileSystemResult<()>> + Send + 'async_trait>>
fn copy<'life0, 'async_trait, P1, P2>( &'life0 self, from: P1, to: P2, ) -> Pin<Box<dyn Future<Output = FileSystemResult<()>> + Send + 'async_trait>>
fn set_mode<'life0, 'async_trait, P>( &'life0 self, path: P, mode: u32, ) -> Pin<Box<dyn Future<Output = FileSystemResult<()>> + Send + 'async_trait>>
fn exists<'life0, 'async_trait, P>( &'life0 self, path: P, ) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
Auto Trait Implementations§
impl Freeze for InMemoryFileSystem
impl !RefUnwindSafe for InMemoryFileSystem
impl Send for InMemoryFileSystem
impl Sync for InMemoryFileSystem
impl Unpin for InMemoryFileSystem
impl !UnwindSafe for InMemoryFileSystem
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