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 { ... }
}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§
Sourcefn init(&self, req: RequestInfo, config: &mut KernelConfig) -> ResultEmpty
fn init(&self, req: RequestInfo, config: &mut KernelConfig) -> ResultEmpty
Configures the FUSE connection before requests are dispatched.
Sourcefn getattr(
&self,
req: RequestInfo,
path: EntryRef,
fh: Option<u64>,
) -> impl Future<Output = ResultEntry> + Send
fn getattr( &self, req: RequestInfo, path: EntryRef, fh: Option<u64>, ) -> impl Future<Output = ResultEntry> + Send
Gets the attributes of a filesystem entry.
Sourcefn chmod(
&self,
req: RequestInfo,
path: ResolvedPath,
fh: Option<u64>,
mode: u32,
) -> impl Future<Output = ResultEmpty> + Send
fn chmod( &self, req: RequestInfo, path: ResolvedPath, fh: Option<u64>, mode: u32, ) -> impl Future<Output = ResultEmpty> + Send
Changes the mode of a filesystem entry.
Sourcefn chown(
&self,
req: RequestInfo,
path: ResolvedPath,
fh: Option<u64>,
uid: Option<u32>,
gid: Option<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
Changes the owner UID and/or group GID of a filesystem entry.
Sourcefn truncate(
&self,
req: RequestInfo,
path: ResolvedPath,
fh: Option<u64>,
size: u64,
) -> impl Future<Output = ResultEmpty> + Send
fn truncate( &self, req: RequestInfo, path: ResolvedPath, fh: Option<u64>, size: u64, ) -> impl Future<Output = ResultEmpty> + Send
Sets the length of a file.
Sourcefn utimens(
&self,
req: RequestInfo,
path: ResolvedPath,
fh: Option<u64>,
atime: Option<SystemTime>,
mtime: Option<SystemTime>,
) -> 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
Sets the access and modification timestamps of an entry.
Sourcefn 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 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.
Sourcefn readlink(
&self,
req: RequestInfo,
path: ResolvedPath,
) -> impl Future<Output = ResultData> + Send
fn readlink( &self, req: RequestInfo, path: ResolvedPath, ) -> impl Future<Output = ResultData> + Send
Reads a symbolic link.
Sourcefn mknod(
&self,
req: RequestInfo,
entry: EntryName,
mode: u32,
rdev: u32,
) -> impl Future<Output = ResultEntry> + Send
fn mknod( &self, req: RequestInfo, entry: EntryName, mode: u32, rdev: u32, ) -> impl Future<Output = ResultEntry> + Send
Creates a special file.
Sourcefn mkdir(
&self,
req: RequestInfo,
entry: EntryName,
mode: u32,
) -> impl Future<Output = ResultEntry> + Send
fn mkdir( &self, req: RequestInfo, entry: EntryName, mode: u32, ) -> impl Future<Output = ResultEntry> + Send
Creates a directory.
Sourcefn unlink(
&self,
req: RequestInfo,
entry: EntryName,
) -> impl Future<Output = ResultEmpty> + Send
fn unlink( &self, req: RequestInfo, entry: EntryName, ) -> impl Future<Output = ResultEmpty> + Send
Removes a file.
Sourcefn rmdir(
&self,
req: RequestInfo,
entry: EntryName,
) -> impl Future<Output = ResultEmpty> + Send
fn rmdir( &self, req: RequestInfo, entry: EntryName, ) -> impl Future<Output = ResultEmpty> + Send
Removes a directory.
Sourcefn symlink(
&self,
req: RequestInfo,
entry: EntryName,
target: PathBuf,
) -> impl Future<Output = ResultEntry> + Send
fn symlink( &self, req: RequestInfo, entry: EntryName, target: PathBuf, ) -> impl Future<Output = ResultEntry> + Send
Creates a symbolic link.
Sourcefn rename(
&self,
req: RequestInfo,
entry: EntryName,
new_entry: EntryName,
) -> impl Future<Output = ResultEmpty> + Send
fn rename( &self, req: RequestInfo, entry: EntryName, new_entry: EntryName, ) -> impl Future<Output = ResultEmpty> + Send
Renames a filesystem entry.
Sourcefn link(
&self,
req: RequestInfo,
path: ResolvedPath,
new_entry: EntryName,
) -> impl Future<Output = ResultEntry> + Send
fn link( &self, req: RequestInfo, path: ResolvedPath, new_entry: EntryName, ) -> impl Future<Output = ResultEntry> + Send
Creates a hard link.
Sourcefn open(
&self,
req: RequestInfo,
path: ResolvedPath,
flags: u32,
) -> impl Future<Output = ResultOpen> + Send
fn open( &self, req: RequestInfo, path: ResolvedPath, flags: u32, ) -> impl Future<Output = ResultOpen> + Send
Opens a file.
Sourcefn read(
&self,
req: RequestInfo,
path: ResolvedPath,
fh: u64,
offset: u64,
size: u32,
) -> impl Future<Output = ResultData> + Send
fn read( &self, req: RequestInfo, path: ResolvedPath, fh: u64, offset: u64, size: u32, ) -> impl Future<Output = ResultData> + Send
Reads data from a file.
Sourcefn write(
&self,
req: RequestInfo,
path: ResolvedPath,
fh: u64,
offset: u64,
data: Vec<u8>,
flags: u32,
) -> impl Future<Output = ResultWrite> + Send
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.
Sourcefn flush(
&self,
req: RequestInfo,
path: ResolvedPath,
fh: u64,
lock_owner: u64,
) -> impl Future<Output = ResultEmpty> + Send
fn flush( &self, req: RequestInfo, path: ResolvedPath, fh: u64, lock_owner: u64, ) -> impl Future<Output = ResultEmpty> + Send
Flushes pending data for an open file.
Sourcefn release(
&self,
req: RequestInfo,
path: ResolvedPath,
fh: u64,
flags: u32,
lock_owner: u64,
flush: bool,
) -> 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
Releases an open file.
Sourcefn fsync(
&self,
req: RequestInfo,
path: ResolvedPath,
fh: u64,
datasync: bool,
) -> impl Future<Output = ResultEmpty> + Send
fn fsync( &self, req: RequestInfo, path: ResolvedPath, fh: u64, datasync: bool, ) -> impl Future<Output = ResultEmpty> + Send
Synchronizes an open file with its backing storage.
Sourcefn opendir(
&self,
req: RequestInfo,
path: ResolvedPath,
flags: u32,
) -> impl Future<Output = ResultOpen> + Send
fn opendir( &self, req: RequestInfo, path: ResolvedPath, flags: u32, ) -> impl Future<Output = ResultOpen> + Send
Opens a directory.
Sourcefn releasedir(
&self,
req: RequestInfo,
path: ResolvedPath,
fh: u64,
flags: u32,
) -> impl Future<Output = ResultEmpty> + Send
fn releasedir( &self, req: RequestInfo, path: ResolvedPath, fh: u64, flags: u32, ) -> impl Future<Output = ResultEmpty> + Send
Releases an open directory.
Sourcefn fsyncdir(
&self,
req: RequestInfo,
path: ResolvedPath,
fh: u64,
datasync: bool,
) -> impl Future<Output = ResultEmpty> + Send
fn fsyncdir( &self, req: RequestInfo, path: ResolvedPath, fh: u64, datasync: bool, ) -> impl Future<Output = ResultEmpty> + Send
Synchronizes an open directory with its backing storage.
Sourcefn statfs(
&self,
req: RequestInfo,
path: ResolvedPath,
) -> impl Future<Output = ResultStatfs> + Send
fn statfs( &self, req: RequestInfo, path: ResolvedPath, ) -> impl Future<Output = ResultStatfs> + Send
Gets filesystem statistics.
Sourcefn setxattr(
&self,
req: RequestInfo,
path: ResolvedPath,
name: OsString,
value: Vec<u8>,
flags: u32,
position: u32,
) -> impl Future<Output = ResultEmpty> + Send
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.
Sourcefn getxattr(
&self,
req: RequestInfo,
path: ResolvedPath,
name: OsString,
size: u32,
) -> impl Future<Output = ResultXattr> + Send
fn getxattr( &self, req: RequestInfo, path: ResolvedPath, name: OsString, size: u32, ) -> impl Future<Output = ResultXattr> + Send
Gets an extended attribute.
Sourcefn listxattr(
&self,
req: RequestInfo,
path: ResolvedPath,
size: u32,
) -> impl Future<Output = ResultXattr> + Send
fn listxattr( &self, req: RequestInfo, path: ResolvedPath, size: u32, ) -> impl Future<Output = ResultXattr> + Send
Lists the extended attributes of an entry.
Sourcefn removexattr(
&self,
req: RequestInfo,
path: ResolvedPath,
name: OsString,
) -> impl Future<Output = ResultEmpty> + Send
fn removexattr( &self, req: RequestInfo, path: ResolvedPath, name: OsString, ) -> impl Future<Output = ResultEmpty> + Send
Removes an extended attribute.
Sourcefn access(
&self,
req: RequestInfo,
path: ResolvedPath,
mask: u32,
) -> impl Future<Output = ResultEmpty> + Send
fn access( &self, req: RequestInfo, path: ResolvedPath, mask: u32, ) -> impl Future<Output = ResultEmpty> + Send
Checks whether an entry permits the requested access.
Sourcefn create(
&self,
req: RequestInfo,
path: ResolvedPath,
mode: u32,
flags: u32,
) -> impl Future<Output = ResultCreate> + Send
fn create( &self, req: RequestInfo, path: ResolvedPath, mode: u32, flags: u32, ) -> impl Future<Output = ResultCreate> + Send
Creates and opens a file.
Provided Methods§
Sourcefn readdir(
&self,
_req: RequestInfo,
_path: ResolvedPath,
_fh: u64,
) -> impl Stream<Item = ResultReaddirBatch> + Send + 'static
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.
Sourcefn legacy_readdir(
&self,
_req: RequestInfo,
_path: ResolvedPath,
_fh: u64,
) -> impl Stream<Item = ResultLegacyReaddirBatch> + Send + 'static
Available on crate feature legacy_readdir only.
fn legacy_readdir( &self, _req: RequestInfo, _path: ResolvedPath, _fh: u64, ) -> impl Stream<Item = ResultLegacyReaddirBatch> + Send + 'static
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".