pub struct MemoryFsProvider { /* private fields */ }Implementations§
Source§impl MemoryFsProvider
impl MemoryFsProvider
pub fn new() -> Self
pub fn with_current_dir(default_current_dir: impl Into<PathBuf>) -> Self
pub fn reset(&self)
pub fn read_project_path(&self, path: impl AsRef<Path>) -> Result<Vec<u8>>
pub fn write_project_path( &self, path: impl AsRef<Path>, data: &[u8], ) -> Result<()>
pub fn list_project_path(&self, path: impl AsRef<Path>) -> Result<Vec<DirEntry>>
pub fn metadata_project_path( &self, path: impl AsRef<Path>, ) -> Result<FsMetadata>
pub fn create_dir_project_path( &self, path: impl AsRef<Path>, recursive: bool, ) -> Result<()>
pub fn remove_project_path( &self, path: impl AsRef<Path>, recursive: bool, ) -> Result<()>
pub fn rename_project_path( &self, from: impl AsRef<Path>, to: impl AsRef<Path>, ) -> Result<()>
Trait Implementations§
Source§impl Clone for MemoryFsProvider
impl Clone for MemoryFsProvider
Source§fn clone(&self) -> MemoryFsProvider
fn clone(&self) -> MemoryFsProvider
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 MemoryFsProvider
impl Debug for MemoryFsProvider
Source§impl Default for MemoryFsProvider
impl Default for MemoryFsProvider
Source§impl FsProvider for MemoryFsProvider
impl FsProvider for MemoryFsProvider
fn current_dir_override(&self) -> Option<PathBuf>
fn open(&self, path: &Path, flags: &OpenFlags) -> Result<Box<dyn FileHandle>>
fn read<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 Path,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn write<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
path: &'life1 Path,
data: &'life2 [u8],
) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn remove_file<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 Path,
) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn metadata<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 Path,
) -> Pin<Box<dyn Future<Output = Result<FsMetadata>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn symlink_metadata<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 Path,
) -> Pin<Box<dyn Future<Output = Result<FsMetadata>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn read_dir<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 Path,
) -> Pin<Box<dyn Future<Output = Result<Vec<DirEntry>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn canonicalize<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 Path,
) -> Pin<Box<dyn Future<Output = Result<PathBuf>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn create_dir<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 Path,
) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn create_dir_all<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 Path,
) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn remove_dir<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 Path,
) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn remove_dir_all<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 Path,
) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn rename<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
from: &'life1 Path,
to: &'life2 Path,
) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn set_readonly<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 Path,
readonly: bool,
) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn open_async<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
path: &'life1 Path,
flags: &'life2 OpenFlags,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn FileHandle>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn read_many<'life0, 'life1, 'async_trait>(
&'life0 self,
paths: &'life1 [PathBuf],
) -> Pin<Box<dyn Future<Output = Result<Vec<ReadManyEntry>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn data_manifest_descriptor<'life0, 'life1, 'async_trait>(
&'life0 self,
_request: &'life1 DataManifestRequest,
) -> Pin<Box<dyn Future<Output = Result<DataManifestDescriptor>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn data_chunk_upload_targets<'life0, 'life1, 'async_trait>(
&'life0 self,
_request: &'life1 DataChunkUploadRequest,
) -> Pin<Box<dyn Future<Output = Result<Vec<DataChunkUploadTarget>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn data_upload_chunk<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_target: &'life1 DataChunkUploadTarget,
_data: &'life2 [u8],
) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn select_file_open<'life0, 'life1, 'async_trait>(
&'life0 self,
_request: &'life1 OpenFileDialogRequest,
) -> Pin<Box<dyn Future<Output = Result<Option<OpenFileDialogSelection>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn select_file_save<'life0, 'life1, 'async_trait>(
&'life0 self,
_request: &'life1 SaveFileDialogRequest,
) -> Pin<Box<dyn Future<Output = Result<Option<SaveFileDialogSelection>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Auto Trait Implementations§
impl Freeze for MemoryFsProvider
impl RefUnwindSafe for MemoryFsProvider
impl Send for MemoryFsProvider
impl Sync for MemoryFsProvider
impl Unpin for MemoryFsProvider
impl UnsafeUnpin for MemoryFsProvider
impl UnwindSafe for MemoryFsProvider
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