Skip to main content

AsyncFilesystem

Trait AsyncFilesystem 

Source
pub trait AsyncFilesystem:
    Send
    + Sync
    + 'static {
Show 34 methods // Required methods fn init(&self, req: RequestInfo, config: &mut KernelConfig) -> ResultEmpty; fn destroy(&self); fn getattr( &self, req: RequestInfo, path: EntryRef, fh: Option<u64>, ) -> impl Future<Output = ResultEntry> + Send; fn chmod( &self, req: RequestInfo, path: ResolvedPath, fh: Option<u64>, mode: u32, ) -> impl Future<Output = ResultEmpty> + Send; fn chown( &self, req: RequestInfo, path: ResolvedPath, fh: Option<u64>, uid: Option<u32>, gid: Option<u32>, ) -> impl Future<Output = ResultEmpty> + Send; fn truncate( &self, req: RequestInfo, path: ResolvedPath, fh: Option<u64>, size: u64, ) -> impl Future<Output = ResultEmpty> + Send; fn utimens( &self, req: RequestInfo, path: ResolvedPath, fh: Option<u64>, atime: Option<SystemTime>, mtime: Option<SystemTime>, ) -> impl Future<Output = ResultEmpty> + Send; fn utimens_macos( &self, req: RequestInfo, path: ResolvedPath, fh: Option<u64>, crtime: Option<SystemTime>, chgtime: Option<SystemTime>, bkuptime: Option<SystemTime>, flags: Option<u32>, ) -> impl Future<Output = ResultEmpty> + Send; fn readlink( &self, req: RequestInfo, path: ResolvedPath, ) -> impl Future<Output = ResultData> + Send; fn mknod( &self, req: RequestInfo, entry: EntryName, mode: u32, rdev: u32, ) -> impl Future<Output = ResultEntry> + Send; fn mkdir( &self, req: RequestInfo, entry: EntryName, mode: u32, ) -> impl Future<Output = ResultEntry> + Send; fn unlink( &self, req: RequestInfo, entry: EntryName, ) -> impl Future<Output = ResultEmpty> + Send; fn rmdir( &self, req: RequestInfo, entry: EntryName, ) -> impl Future<Output = ResultEmpty> + Send; fn symlink( &self, req: RequestInfo, entry: EntryName, target: PathBuf, ) -> impl Future<Output = ResultEntry> + Send; fn rename( &self, req: RequestInfo, entry: EntryName, new_entry: EntryName, ) -> impl Future<Output = ResultEmpty> + Send; fn link( &self, req: RequestInfo, path: ResolvedPath, new_entry: EntryName, ) -> impl Future<Output = ResultEntry> + Send; fn open( &self, req: RequestInfo, path: ResolvedPath, flags: u32, ) -> impl Future<Output = ResultOpen> + Send; fn read( &self, req: RequestInfo, path: ResolvedPath, fh: u64, offset: u64, size: u32, ) -> impl Future<Output = ResultData> + Send; fn write( &self, req: RequestInfo, path: ResolvedPath, fh: u64, offset: u64, data: Vec<u8>, flags: u32, ) -> impl Future<Output = ResultWrite> + Send; fn flush( &self, req: RequestInfo, path: ResolvedPath, fh: u64, lock_owner: u64, ) -> impl Future<Output = ResultEmpty> + Send; fn release( &self, req: RequestInfo, path: ResolvedPath, fh: u64, flags: u32, lock_owner: u64, flush: bool, ) -> impl Future<Output = ResultEmpty> + Send; fn fsync( &self, req: RequestInfo, path: ResolvedPath, fh: u64, datasync: bool, ) -> impl Future<Output = ResultEmpty> + Send; fn opendir( &self, req: RequestInfo, path: ResolvedPath, flags: u32, ) -> impl Future<Output = ResultOpen> + Send; fn releasedir( &self, req: RequestInfo, path: ResolvedPath, fh: u64, flags: u32, ) -> impl Future<Output = ResultEmpty> + Send; fn fsyncdir( &self, req: RequestInfo, path: ResolvedPath, fh: u64, datasync: bool, ) -> impl Future<Output = ResultEmpty> + Send; fn statfs( &self, req: RequestInfo, path: ResolvedPath, ) -> impl Future<Output = ResultStatfs> + Send; fn setxattr( &self, req: RequestInfo, path: ResolvedPath, name: OsString, value: Vec<u8>, flags: u32, position: u32, ) -> impl Future<Output = ResultEmpty> + Send; fn getxattr( &self, req: RequestInfo, path: ResolvedPath, name: OsString, size: u32, ) -> impl Future<Output = ResultXattr> + Send; fn listxattr( &self, req: RequestInfo, path: ResolvedPath, size: u32, ) -> impl Future<Output = ResultXattr> + Send; fn removexattr( &self, req: RequestInfo, path: ResolvedPath, name: OsString, ) -> impl Future<Output = ResultEmpty> + Send; fn access( &self, req: RequestInfo, path: ResolvedPath, mask: u32, ) -> impl Future<Output = ResultEmpty> + Send; fn create( &self, req: RequestInfo, path: ResolvedPath, mode: u32, flags: u32, ) -> impl Future<Output = ResultCreate> + Send; // Provided methods fn readdir( &self, _req: RequestInfo, _path: ResolvedPath, _fh: u64, ) -> impl Stream<Item = ResultReaddirBatch> + Send + 'static { ... } fn legacy_readdir( &self, _req: RequestInfo, _path: ResolvedPath, _fh: u64, ) -> impl Stream<Item = ResultLegacyReaddirBatch> + Send + 'static { ... }
}
Available on crate feature async only.
Expand description

Filesystem operations that may complete asynchronously.

Operation arguments are owned so their futures can outlive the FUSE request callback.

Required Methods§

Source

fn init(&self, req: RequestInfo, config: &mut KernelConfig) -> ResultEmpty

Configures the FUSE connection before requests are dispatched.

Source

fn destroy(&self)

Cleans up the filesystem during unmount.

Source

fn getattr( &self, req: RequestInfo, path: EntryRef, fh: Option<u64>, ) -> impl Future<Output = ResultEntry> + Send

Gets the attributes of a filesystem entry.

Source

fn chmod( &self, req: RequestInfo, path: ResolvedPath, fh: Option<u64>, mode: u32, ) -> impl Future<Output = ResultEmpty> + Send

Changes the mode of a filesystem entry.

Source

fn chown( &self, req: RequestInfo, path: ResolvedPath, fh: Option<u64>, uid: Option<u32>, gid: Option<u32>, ) -> impl Future<Output = ResultEmpty> + Send

Changes the owner UID and/or group GID of a filesystem entry.

Source

fn truncate( &self, req: RequestInfo, path: ResolvedPath, fh: Option<u64>, size: u64, ) -> impl Future<Output = ResultEmpty> + Send

Sets the length of a file.

Source

fn utimens( &self, req: RequestInfo, path: ResolvedPath, fh: Option<u64>, atime: Option<SystemTime>, mtime: Option<SystemTime>, ) -> impl Future<Output = ResultEmpty> + Send

Sets the access and modification timestamps of an entry.

Source

fn utimens_macos( &self, req: RequestInfo, path: ResolvedPath, fh: Option<u64>, crtime: Option<SystemTime>, chgtime: Option<SystemTime>, bkuptime: Option<SystemTime>, flags: Option<u32>, ) -> impl Future<Output = ResultEmpty> + Send

Sets the macOS-specific timestamps and flags of an entry.

Reads a symbolic link.

Source

fn mknod( &self, req: RequestInfo, entry: EntryName, mode: u32, rdev: u32, ) -> impl Future<Output = ResultEntry> + Send

Creates a special file.

Source

fn mkdir( &self, req: RequestInfo, entry: EntryName, mode: u32, ) -> impl Future<Output = ResultEntry> + Send

Creates a directory.

Removes a file.

Source

fn rmdir( &self, req: RequestInfo, entry: EntryName, ) -> impl Future<Output = ResultEmpty> + Send

Removes a directory.

Creates a symbolic link.

Source

fn rename( &self, req: RequestInfo, entry: EntryName, new_entry: EntryName, ) -> impl Future<Output = ResultEmpty> + Send

Renames a filesystem entry.

Creates a hard link.

Source

fn open( &self, req: RequestInfo, path: ResolvedPath, flags: u32, ) -> impl Future<Output = ResultOpen> + Send

Opens a file.

Source

fn read( &self, req: RequestInfo, path: ResolvedPath, fh: u64, offset: u64, size: u32, ) -> impl Future<Output = ResultData> + Send

Reads data from a file.

Source

fn write( &self, req: RequestInfo, path: ResolvedPath, fh: u64, offset: u64, data: Vec<u8>, flags: u32, ) -> impl Future<Output = ResultWrite> + Send

Writes data to a file.

Source

fn flush( &self, req: RequestInfo, path: ResolvedPath, fh: u64, lock_owner: u64, ) -> impl Future<Output = ResultEmpty> + Send

Flushes pending data for an open file.

Source

fn release( &self, req: RequestInfo, path: ResolvedPath, fh: u64, flags: u32, lock_owner: u64, flush: bool, ) -> impl Future<Output = ResultEmpty> + Send

Releases an open file.

Source

fn fsync( &self, req: RequestInfo, path: ResolvedPath, fh: u64, datasync: bool, ) -> impl Future<Output = ResultEmpty> + Send

Synchronizes an open file with its backing storage.

Source

fn opendir( &self, req: RequestInfo, path: ResolvedPath, flags: u32, ) -> impl Future<Output = ResultOpen> + Send

Opens a directory.

Source

fn releasedir( &self, req: RequestInfo, path: ResolvedPath, fh: u64, flags: u32, ) -> impl Future<Output = ResultEmpty> + Send

Releases an open directory.

Source

fn fsyncdir( &self, req: RequestInfo, path: ResolvedPath, fh: u64, datasync: bool, ) -> impl Future<Output = ResultEmpty> + Send

Synchronizes an open directory with its backing storage.

Source

fn statfs( &self, req: RequestInfo, path: ResolvedPath, ) -> impl Future<Output = ResultStatfs> + Send

Gets filesystem statistics.

Source

fn setxattr( &self, req: RequestInfo, path: ResolvedPath, name: OsString, value: Vec<u8>, flags: u32, position: u32, ) -> impl Future<Output = ResultEmpty> + Send

Sets an extended attribute.

Source

fn getxattr( &self, req: RequestInfo, path: ResolvedPath, name: OsString, size: u32, ) -> impl Future<Output = ResultXattr> + Send

Gets an extended attribute.

Source

fn listxattr( &self, req: RequestInfo, path: ResolvedPath, size: u32, ) -> impl Future<Output = ResultXattr> + Send

Lists the extended attributes of an entry.

Source

fn removexattr( &self, req: RequestInfo, path: ResolvedPath, name: OsString, ) -> impl Future<Output = ResultEmpty> + Send

Removes an extended attribute.

Source

fn access( &self, req: RequestInfo, path: ResolvedPath, mask: u32, ) -> impl Future<Output = ResultEmpty> + Send

Checks whether an entry permits the requested access.

Source

fn create( &self, req: RequestInfo, path: ResolvedPath, mode: u32, flags: u32, ) -> impl Future<Output = ResultCreate> + Send

Creates and opens a file.

Provided Methods§

Source

fn readdir( &self, _req: RequestInfo, _path: ResolvedPath, _fh: u64, ) -> impl Stream<Item = ResultReaddirBatch> + Send + 'static

Gets directory entries and attributes as an asynchronous stream of batches.

Source

fn legacy_readdir( &self, _req: RequestInfo, _path: ResolvedPath, _fh: u64, ) -> impl Stream<Item = ResultLegacyReaddirBatch> + Send + 'static

Available on crate feature legacy_readdir only.

Gets directory entries without attributes for the legacy FUSE readdir operation.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§