pub trait NfsFileSystem:
Send
+ Sync
+ 'static {
Show 17 methods
// Required methods
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 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_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 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 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 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 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 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_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 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 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;
// Provided methods
fn root(&self) -> FileId { ... }
fn symlinks(&self) -> Option<&dyn NfsSymlinks> { ... }
fn hard_links(&self) -> Option<&dyn NfsHardLinks> { ... }
fn named_attrs(&self) -> Option<&dyn NfsNamedAttrs> { ... }
fn syncer(&self) -> Option<&dyn NfsSync> { ... }
fn fs_info(&self) -> FsInfo { ... }
}Expand description
The core filesystem trait.
Required Methods§
Sourcefn 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.
Sourcefn 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.
Sourcefn 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.
Sourcefn 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.
Do not synthesize "." or ".."; the server handles cookie and reply
formatting for the entries returned here.
Sourcefn 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.
Sourcefn 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.
Sourcefn 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.
Sourcefn 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.
Sourcefn 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.
Sourcefn 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.
Sourcefn 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.
Provided Methods§
Sourcefn symlinks(&self) -> Option<&dyn NfsSymlinks>
fn symlinks(&self) -> Option<&dyn NfsSymlinks>
Optional symlink capability.
Sourcefn hard_links(&self) -> Option<&dyn NfsHardLinks>
fn hard_links(&self) -> Option<&dyn NfsHardLinks>
Optional hard-link capability.
Sourcefn named_attrs(&self) -> Option<&dyn NfsNamedAttrs>
fn named_attrs(&self) -> Option<&dyn NfsNamedAttrs>
Optional named-attribute capability.