Skip to main content

NfsFileSystem

Trait NfsFileSystem 

Source
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§

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,

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,

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,

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,

List a directory’s entries.

Do not synthesize "." or ".."; the server handles cookie and reply formatting for the entries returned here.

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,

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,

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,

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,

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,

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,

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,

Rename or move an entry.

Provided Methods§

Source

fn root(&self) -> FileId

Return the root object ID. The default root is 1.

Optional symlink capability.

Optional hard-link capability.

Source

fn named_attrs(&self) -> Option<&dyn NfsNamedAttrs>

Optional named-attribute capability.

Source

fn syncer(&self) -> Option<&dyn NfsSync>

Optional explicit flush capability.

Source

fn fs_info(&self) -> FsInfo

Filesystem-level information.

Implementors§