pub struct MemFs { /* private fields */ }Expand description
An in-memory filesystem.
Implementations§
Trait Implementations§
Source§impl NfsFileSystem for MemFs
impl NfsFileSystem for MemFs
Source§fn stat<'life0, 'async_trait>(
&'life0 self,
id: FileId,
) -> Pin<Box<dyn Future<Output = NfsResult<NodeInfo>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn stat<'life0, 'async_trait>(
&'life0 self,
id: FileId,
) -> Pin<Box<dyn Future<Output = NfsResult<NodeInfo>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Return minimal information about an object.
Source§fn lookup<'life0, 'life1, 'async_trait>(
&'life0 self,
dir_id: FileId,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = NfsResult<FileId>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn lookup<'life0, 'life1, 'async_trait>(
&'life0 self,
dir_id: FileId,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = NfsResult<FileId>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Look up a child entry by name in a directory.
Source§fn lookup_parent<'life0, 'async_trait>(
&'life0 self,
id: FileId,
) -> Pin<Box<dyn Future<Output = NfsResult<FileId>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn lookup_parent<'life0, 'async_trait>(
&'life0 self,
id: FileId,
) -> Pin<Box<dyn Future<Output = NfsResult<FileId>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Look up the parent of an object.
Source§fn readdir<'life0, 'async_trait>(
&'life0 self,
dir_id: FileId,
) -> Pin<Box<dyn Future<Output = NfsResult<Vec<DirEntry>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn readdir<'life0, 'async_trait>(
&'life0 self,
dir_id: FileId,
) -> Pin<Box<dyn Future<Output = NfsResult<Vec<DirEntry>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
List a directory’s entries. Read more
Source§fn read<'life0, 'async_trait>(
&'life0 self,
id: FileId,
offset: u64,
count: u32,
) -> Pin<Box<dyn Future<Output = NfsResult<(Vec<u8>, bool)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn read<'life0, 'async_trait>(
&'life0 self,
id: FileId,
offset: u64,
count: u32,
) -> Pin<Box<dyn Future<Output = NfsResult<(Vec<u8>, bool)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Read file data.
Source§fn write<'life0, 'life1, 'async_trait>(
&'life0 self,
id: FileId,
offset: u64,
data: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = NfsResult<u32>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn write<'life0, 'life1, 'async_trait>(
&'life0 self,
id: FileId,
offset: u64,
data: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = NfsResult<u32>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Write file data. Returns bytes written.
Source§fn truncate<'life0, 'async_trait>(
&'life0 self,
id: FileId,
size: u64,
) -> Pin<Box<dyn Future<Output = NfsResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn truncate<'life0, 'async_trait>(
&'life0 self,
id: FileId,
size: u64,
) -> Pin<Box<dyn Future<Output = NfsResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Truncate or extend a file to the given size.
Source§fn create_file<'life0, 'life1, 'async_trait>(
&'life0 self,
dir_id: FileId,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = NfsResult<FileId>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn create_file<'life0, 'life1, 'async_trait>(
&'life0 self,
dir_id: FileId,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = NfsResult<FileId>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Create a regular file and return its
FileId.Source§fn create_dir<'life0, 'life1, 'async_trait>(
&'life0 self,
dir_id: FileId,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = NfsResult<FileId>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn create_dir<'life0, 'life1, 'async_trait>(
&'life0 self,
dir_id: FileId,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = NfsResult<FileId>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Create a directory and return its
FileId.Source§fn remove<'life0, 'life1, 'async_trait>(
&'life0 self,
dir_id: FileId,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = NfsResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn remove<'life0, 'life1, 'async_trait>(
&'life0 self,
dir_id: FileId,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = NfsResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Remove a file or empty directory by name.
Source§fn rename<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
from_dir: FileId,
from_name: &'life1 str,
to_dir: FileId,
to_name: &'life2 str,
) -> Pin<Box<dyn Future<Output = NfsResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn rename<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
from_dir: FileId,
from_name: &'life1 str,
to_dir: FileId,
to_name: &'life2 str,
) -> Pin<Box<dyn Future<Output = NfsResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Rename or move an entry.
Source§fn symlinks(&self) -> Option<&dyn NfsSymlinks>
fn symlinks(&self) -> Option<&dyn NfsSymlinks>
Optional symlink capability.
Source§fn hard_links(&self) -> Option<&dyn NfsHardLinks>
fn hard_links(&self) -> Option<&dyn NfsHardLinks>
Optional hard-link capability.
Source§fn named_attrs(&self) -> Option<&dyn NfsNamedAttrs>
fn named_attrs(&self) -> Option<&dyn NfsNamedAttrs>
Optional named-attribute capability.
Source§impl NfsHardLinks for MemFs
impl NfsHardLinks for MemFs
Source§impl NfsNamedAttrs for MemFs
impl NfsNamedAttrs for MemFs
Source§fn list_xattrs<'life0, 'async_trait>(
&'life0 self,
id: FileId,
) -> Pin<Box<dyn Future<Output = NfsResult<Vec<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_xattrs<'life0, 'async_trait>(
&'life0 self,
id: FileId,
) -> Pin<Box<dyn Future<Output = NfsResult<Vec<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
List all named attributes attached to an object.
Source§fn get_xattr<'life0, 'life1, 'async_trait>(
&'life0 self,
id: FileId,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = NfsResult<Vec<u8>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_xattr<'life0, 'life1, 'async_trait>(
&'life0 self,
id: FileId,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = NfsResult<Vec<u8>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Fetch a full named-attribute value.
Source§fn set_xattr<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: FileId,
name: &'life1 str,
value: &'life2 [u8],
mode: XattrSetMode,
) -> Pin<Box<dyn Future<Output = NfsResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn set_xattr<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: FileId,
name: &'life1 str,
value: &'life2 [u8],
mode: XattrSetMode,
) -> Pin<Box<dyn Future<Output = NfsResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Set or replace a named-attribute value.
Source§impl NfsSymlinks for MemFs
impl NfsSymlinks for MemFs
Source§fn symlink<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
dir_id: FileId,
name: &'life1 str,
target: &'life2 str,
) -> Pin<Box<dyn Future<Output = NfsResult<FileId>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn symlink<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
dir_id: FileId,
name: &'life1 str,
target: &'life2 str,
) -> Pin<Box<dyn Future<Output = NfsResult<FileId>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Create a symlink in a directory and return its
FileId.Auto Trait Implementations§
impl !Freeze for MemFs
impl !RefUnwindSafe for MemFs
impl Send for MemFs
impl Sync for MemFs
impl Unpin for MemFs
impl UnsafeUnpin for MemFs
impl !UnwindSafe for MemFs
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