pub trait AsyncFilesystem:
Send
+ Sync
+ 'static {
Show 30 methods
// Provided methods
fn init<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
_req: &'life1 Request,
_config: &'life2 mut KernelConfig,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
fn destroy(&mut self) { ... }
fn lookup<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
context: &'life1 Request,
parent: INodeNo,
name: &'life2 OsStr,
) -> Pin<Box<dyn Future<Output = Result<LookupResponse, Errno>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
fn getattr<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 Request,
ino: INodeNo,
file_handle: Option<FileHandle>,
) -> Pin<Box<dyn Future<Output = Result<GetAttrResponse, Errno>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn forget<'life0, 'life1, 'async_trait>(
&'life0 self,
req: &'life1 Request,
ino: INodeNo,
nlookup: u64,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn setattr<'life0, 'life1, 'async_trait>(
&'life0 self,
req: &'life1 Request,
ino: INodeNo,
mode: Option<u32>,
uid: Option<u32>,
gid: Option<u32>,
size: Option<u64>,
atime: Option<TimeOrNow>,
mtime: Option<TimeOrNow>,
ctime: Option<SystemTime>,
fh: Option<FileHandle>,
crtime: Option<SystemTime>,
chgtime: Option<SystemTime>,
bkuptime: Option<SystemTime>,
flags: Option<BsdFileFlags>,
) -> Pin<Box<dyn Future<Output = Result<AttrResponse, Errno>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn readlink<'life0, 'life1, 'async_trait>(
&'life0 self,
req: &'life1 Request,
ino: INodeNo,
) -> Pin<Box<dyn Future<Output = Result<DataResponse, Errno>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn mknod<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
req: &'life1 Request,
parent: INodeNo,
name: &'life2 OsStr,
mode: u32,
umask: u32,
rdev: u32,
) -> Pin<Box<dyn Future<Output = Result<EntryResponse, Errno>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
fn mkdir<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
req: &'life1 Request,
parent: INodeNo,
name: &'life2 OsStr,
mode: u32,
umask: u32,
) -> Pin<Box<dyn Future<Output = Result<EntryResponse, Errno>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
fn unlink<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
req: &'life1 Request,
parent: INodeNo,
name: &'life2 OsStr,
) -> Pin<Box<dyn Future<Output = Result<(), Errno>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
fn rmdir<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
req: &'life1 Request,
parent: INodeNo,
name: &'life2 OsStr,
) -> Pin<Box<dyn Future<Output = Result<(), Errno>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
fn symlink<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
req: &'life1 Request,
parent: INodeNo,
link_name: &'life2 OsStr,
target: &'life3 Path,
) -> Pin<Box<dyn Future<Output = Result<EntryResponse, Errno>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait { ... }
fn rename<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
req: &'life1 Request,
parent: INodeNo,
name: &'life2 OsStr,
newparent: INodeNo,
newname: &'life3 OsStr,
flags: RenameFlags,
) -> Pin<Box<dyn Future<Output = Result<(), Errno>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait { ... }
fn link<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
req: &'life1 Request,
ino: INodeNo,
newparent: INodeNo,
newname: &'life2 OsStr,
) -> Pin<Box<dyn Future<Output = Result<EntryResponse, Errno>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
fn open<'life0, 'life1, 'async_trait>(
&'life0 self,
req: &'life1 Request,
ino: INodeNo,
flags: OpenFlags,
) -> Pin<Box<dyn Future<Output = Result<OpenResponse, Errno>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn read<'life0, 'life1, 'async_trait>(
&'life0 self,
req: &'life1 Request,
ino: INodeNo,
file_handle: FileHandle,
offset: u64,
size: u32,
flags: OpenFlags,
lock: Option<LockOwner>,
) -> Pin<Box<dyn Future<Output = Result<ReadResponse, Errno>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn write<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
req: &'life1 Request,
ino: INodeNo,
fh: FileHandle,
offset: u64,
data: &'life2 [u8],
write_flags: WriteFlags,
flags: OpenFlags,
lock_owner: Option<LockOwner>,
) -> Pin<Box<dyn Future<Output = Result<WriteResponse, Errno>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
fn release<'life0, 'life1, 'async_trait>(
&'life0 self,
req: &'life1 Request,
ino: INodeNo,
fh: FileHandle,
flags: OpenFlags,
lock_owner: Option<LockOwner>,
flush: bool,
) -> Pin<Box<dyn Future<Output = Result<(), Errno>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn opendir<'life0, 'life1, 'async_trait>(
&'life0 self,
req: &'life1 Request,
ino: INodeNo,
flags: OpenFlags,
) -> Pin<Box<dyn Future<Output = Result<OpenResponse, Errno>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn readdir<'life0, 'life1, 'async_trait>(
&'life0 self,
req: &'life1 Request,
ino: INodeNo,
file_handle: FileHandle,
size: u32,
offset: u64,
) -> Pin<Box<dyn Future<Output = Result<DirectoryResponse, Errno>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn releasedir<'life0, 'life1, 'async_trait>(
&'life0 self,
req: &'life1 Request,
ino: INodeNo,
fh: FileHandle,
flags: OpenFlags,
) -> Pin<Box<dyn Future<Output = Result<(), Errno>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn statfs<'life0, 'life1, 'async_trait>(
&'life0 self,
req: &'life1 Request,
ino: INodeNo,
) -> Pin<Box<dyn Future<Output = Result<StatfsResponse, Errno>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn setxattr<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
req: &'life1 Request,
ino: INodeNo,
name: &'life2 OsStr,
value: &'life3 [u8],
flags: i32,
position: u32,
) -> Pin<Box<dyn Future<Output = Result<(), Errno>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait { ... }
fn getxattr<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
req: &'life1 Request,
ino: INodeNo,
name: &'life2 OsStr,
size: u32,
) -> Pin<Box<dyn Future<Output = Result<XattrResponse, Errno>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
fn listxattr<'life0, 'life1, 'async_trait>(
&'life0 self,
req: &'life1 Request,
ino: INodeNo,
size: u32,
) -> Pin<Box<dyn Future<Output = Result<XattrResponse, Errno>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn removexattr<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
req: &'life1 Request,
ino: INodeNo,
name: &'life2 OsStr,
) -> Pin<Box<dyn Future<Output = Result<(), Errno>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
fn access<'life0, 'life1, 'async_trait>(
&'life0 self,
req: &'life1 Request,
ino: INodeNo,
mask: AccessFlags,
) -> Pin<Box<dyn Future<Output = Result<(), Errno>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn create<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
req: &'life1 Request,
parent: INodeNo,
name: &'life2 OsStr,
mode: u32,
umask: u32,
flags: i32,
) -> Pin<Box<dyn Future<Output = Result<CreateResponse, Errno>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
fn fallocate<'life0, 'life1, 'async_trait>(
&'life0 self,
req: &'life1 Request,
ino: INodeNo,
fh: FileHandle,
offset: u64,
length: u64,
mode: i32,
) -> Pin<Box<dyn Future<Output = Result<(), Errno>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn copy_file_range<'life0, 'life1, 'async_trait>(
&'life0 self,
req: &'life1 Request,
ino_in: INodeNo,
fh_in: FileHandle,
offset_in: u64,
ino_out: INodeNo,
fh_out: FileHandle,
offset_out: u64,
len: u64,
flags: CopyFileRangeFlags,
) -> Pin<Box<dyn Future<Output = Result<WriteResponse, Errno>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
}Expand description
Async filesystem trait. This is the async version of crate::Filesystem. It follows a more
Rust-idiomatic async API design rather than the C-like, callback-based interface used
by crate::Filesystem. It is not intended to be a thin wrapper over that API.
Instead of callbacks, this uses a call request -> return result response model, which allows for more straightforward control flow and improved error handling.
Internally, it operates on an async-aware wrapper (AsyncFD) around the FUSE device, enabling better integration and performance with async runtimes.
For the majority of use cases, users should prefer the crate::Filesystem API. It is more
stable and generally performs better in typical scenarios where the primary bottleneck
is the kernel round-trip.
This API is intended for more IO-bound workloads (e.g. network filesystems), where an async model can improve performance by allowing concurrent request handling and integrating cleanly with other asynchronous systems.
Provided Methods§
Sourcefn init<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
_req: &'life1 Request,
_config: &'life2 mut KernelConfig,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn init<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
_req: &'life1 Request,
_config: &'life2 mut KernelConfig,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Initialize the filesystem. This is called before the kernel is ready to start sending requests and to let the filesystem know certain configuration details.
Sourcefn destroy(&mut self)
fn destroy(&mut self)
Clean up filesystem. This is where you drop any resources allocated during the filesystem’s lifetime that won’t be automatically cleaned up.
Sourcefn lookup<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
context: &'life1 Request,
parent: INodeNo,
name: &'life2 OsStr,
) -> Pin<Box<dyn Future<Output = Result<LookupResponse, Errno>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn lookup<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
context: &'life1 Request,
parent: INodeNo,
name: &'life2 OsStr,
) -> Pin<Box<dyn Future<Output = Result<LookupResponse, Errno>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Look up an entry by name and get its attributes. This is called by the kernel when it needs to know if a file exists and what its attributes are.
Sourcefn getattr<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 Request,
ino: INodeNo,
file_handle: Option<FileHandle>,
) -> Pin<Box<dyn Future<Output = Result<GetAttrResponse, Errno>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn getattr<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 Request,
ino: INodeNo,
file_handle: Option<FileHandle>,
) -> Pin<Box<dyn Future<Output = Result<GetAttrResponse, Errno>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get the attributes of an entry. This is called by the kernel when it needs to know the attributes of
a file, either by inode number or by file handle (created on crate::AsyncFilesystem::open).
Sourcefn forget<'life0, 'life1, 'async_trait>(
&'life0 self,
req: &'life1 Request,
ino: INodeNo,
nlookup: u64,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn forget<'life0, 'life1, 'async_trait>(
&'life0 self,
req: &'life1 Request,
ino: INodeNo,
nlookup: u64,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Forget about an inode. Internal only, the kernel is just making us aware for bookkeeping.
Sourcefn setattr<'life0, 'life1, 'async_trait>(
&'life0 self,
req: &'life1 Request,
ino: INodeNo,
mode: Option<u32>,
uid: Option<u32>,
gid: Option<u32>,
size: Option<u64>,
atime: Option<TimeOrNow>,
mtime: Option<TimeOrNow>,
ctime: Option<SystemTime>,
fh: Option<FileHandle>,
crtime: Option<SystemTime>,
chgtime: Option<SystemTime>,
bkuptime: Option<SystemTime>,
flags: Option<BsdFileFlags>,
) -> Pin<Box<dyn Future<Output = Result<AttrResponse, Errno>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn setattr<'life0, 'life1, 'async_trait>(
&'life0 self,
req: &'life1 Request,
ino: INodeNo,
mode: Option<u32>,
uid: Option<u32>,
gid: Option<u32>,
size: Option<u64>,
atime: Option<TimeOrNow>,
mtime: Option<TimeOrNow>,
ctime: Option<SystemTime>,
fh: Option<FileHandle>,
crtime: Option<SystemTime>,
chgtime: Option<SystemTime>,
bkuptime: Option<SystemTime>,
flags: Option<BsdFileFlags>,
) -> Pin<Box<dyn Future<Output = Result<AttrResponse, Errno>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Set file attributes.
Sourcefn readlink<'life0, 'life1, 'async_trait>(
&'life0 self,
req: &'life1 Request,
ino: INodeNo,
) -> Pin<Box<dyn Future<Output = Result<DataResponse, Errno>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn readlink<'life0, 'life1, 'async_trait>(
&'life0 self,
req: &'life1 Request,
ino: INodeNo,
) -> Pin<Box<dyn Future<Output = Result<DataResponse, Errno>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Read a symbolic link.
Sourcefn mknod<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
req: &'life1 Request,
parent: INodeNo,
name: &'life2 OsStr,
mode: u32,
umask: u32,
rdev: u32,
) -> Pin<Box<dyn Future<Output = Result<EntryResponse, Errno>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn mknod<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
req: &'life1 Request,
parent: INodeNo,
name: &'life2 OsStr,
mode: u32,
umask: u32,
rdev: u32,
) -> Pin<Box<dyn Future<Output = Result<EntryResponse, Errno>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Create file node.
Sourcefn mkdir<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
req: &'life1 Request,
parent: INodeNo,
name: &'life2 OsStr,
mode: u32,
umask: u32,
) -> Pin<Box<dyn Future<Output = Result<EntryResponse, Errno>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn mkdir<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
req: &'life1 Request,
parent: INodeNo,
name: &'life2 OsStr,
mode: u32,
umask: u32,
) -> Pin<Box<dyn Future<Output = Result<EntryResponse, Errno>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Create a directory.
Sourcefn unlink<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
req: &'life1 Request,
parent: INodeNo,
name: &'life2 OsStr,
) -> Pin<Box<dyn Future<Output = Result<(), Errno>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn unlink<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
req: &'life1 Request,
parent: INodeNo,
name: &'life2 OsStr,
) -> Pin<Box<dyn Future<Output = Result<(), Errno>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Remove a file.
Sourcefn rmdir<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
req: &'life1 Request,
parent: INodeNo,
name: &'life2 OsStr,
) -> Pin<Box<dyn Future<Output = Result<(), Errno>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn rmdir<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
req: &'life1 Request,
parent: INodeNo,
name: &'life2 OsStr,
) -> Pin<Box<dyn Future<Output = Result<(), Errno>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Remove a directory.
Sourcefn symlink<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
req: &'life1 Request,
parent: INodeNo,
link_name: &'life2 OsStr,
target: &'life3 Path,
) -> Pin<Box<dyn Future<Output = Result<EntryResponse, Errno>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn symlink<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
req: &'life1 Request,
parent: INodeNo,
link_name: &'life2 OsStr,
target: &'life3 Path,
) -> Pin<Box<dyn Future<Output = Result<EntryResponse, Errno>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Create a symbolic link.
Sourcefn rename<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
req: &'life1 Request,
parent: INodeNo,
name: &'life2 OsStr,
newparent: INodeNo,
newname: &'life3 OsStr,
flags: RenameFlags,
) -> Pin<Box<dyn Future<Output = Result<(), Errno>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn rename<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
req: &'life1 Request,
parent: INodeNo,
name: &'life2 OsStr,
newparent: INodeNo,
newname: &'life3 OsStr,
flags: RenameFlags,
) -> Pin<Box<dyn Future<Output = Result<(), Errno>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Rename a file.
Sourcefn link<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
req: &'life1 Request,
ino: INodeNo,
newparent: INodeNo,
newname: &'life2 OsStr,
) -> Pin<Box<dyn Future<Output = Result<EntryResponse, Errno>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn link<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
req: &'life1 Request,
ino: INodeNo,
newparent: INodeNo,
newname: &'life2 OsStr,
) -> Pin<Box<dyn Future<Output = Result<EntryResponse, Errno>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Create a hard link.
Sourcefn open<'life0, 'life1, 'async_trait>(
&'life0 self,
req: &'life1 Request,
ino: INodeNo,
flags: OpenFlags,
) -> Pin<Box<dyn Future<Output = Result<OpenResponse, Errno>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn open<'life0, 'life1, 'async_trait>(
&'life0 self,
req: &'life1 Request,
ino: INodeNo,
flags: OpenFlags,
) -> Pin<Box<dyn Future<Output = Result<OpenResponse, Errno>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Open a file.
Sourcefn read<'life0, 'life1, 'async_trait>(
&'life0 self,
req: &'life1 Request,
ino: INodeNo,
file_handle: FileHandle,
offset: u64,
size: u32,
flags: OpenFlags,
lock: Option<LockOwner>,
) -> Pin<Box<dyn Future<Output = Result<ReadResponse, Errno>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn read<'life0, 'life1, 'async_trait>(
&'life0 self,
req: &'life1 Request,
ino: INodeNo,
file_handle: FileHandle,
offset: u64,
size: u32,
flags: OpenFlags,
lock: Option<LockOwner>,
) -> Pin<Box<dyn Future<Output = Result<ReadResponse, Errno>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Return the data of a file. This is called by the kernel when it needs to read the contents of a file.
Sourcefn write<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
req: &'life1 Request,
ino: INodeNo,
fh: FileHandle,
offset: u64,
data: &'life2 [u8],
write_flags: WriteFlags,
flags: OpenFlags,
lock_owner: Option<LockOwner>,
) -> Pin<Box<dyn Future<Output = Result<WriteResponse, Errno>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn write<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
req: &'life1 Request,
ino: INodeNo,
fh: FileHandle,
offset: u64,
data: &'life2 [u8],
write_flags: WriteFlags,
flags: OpenFlags,
lock_owner: Option<LockOwner>,
) -> Pin<Box<dyn Future<Output = Result<WriteResponse, Errno>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Write data.
Write should return exactly the number of bytes requested except on error. An
exception to this is when the file has been opened in direct_io mode, in
which case the return value of the write system call will reflect the return
value of this operation. fh will contain the value set by the open method, or
will be undefined if the open method didn’t set any value.
write_flags: will contain FUSE_WRITE_CACHE, if this write is from the page cache. If set,
the pid, uid, gid, and fh may not match the value that would have been sent if write cachin
is disabled
flags: these are the file flags, such as O_SYNC. Only supported with ABI >= 7.9
lock_owner: only supported with ABI >= 7.9
Sourcefn release<'life0, 'life1, 'async_trait>(
&'life0 self,
req: &'life1 Request,
ino: INodeNo,
fh: FileHandle,
flags: OpenFlags,
lock_owner: Option<LockOwner>,
flush: bool,
) -> Pin<Box<dyn Future<Output = Result<(), Errno>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn release<'life0, 'life1, 'async_trait>(
&'life0 self,
req: &'life1 Request,
ino: INodeNo,
fh: FileHandle,
flags: OpenFlags,
lock_owner: Option<LockOwner>,
flush: bool,
) -> Pin<Box<dyn Future<Output = Result<(), Errno>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Release an open file.
Sourcefn opendir<'life0, 'life1, 'async_trait>(
&'life0 self,
req: &'life1 Request,
ino: INodeNo,
flags: OpenFlags,
) -> Pin<Box<dyn Future<Output = Result<OpenResponse, Errno>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn opendir<'life0, 'life1, 'async_trait>(
&'life0 self,
req: &'life1 Request,
ino: INodeNo,
flags: OpenFlags,
) -> Pin<Box<dyn Future<Output = Result<OpenResponse, Errno>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Open a directory.
Sourcefn readdir<'life0, 'life1, 'async_trait>(
&'life0 self,
req: &'life1 Request,
ino: INodeNo,
file_handle: FileHandle,
size: u32,
offset: u64,
) -> Pin<Box<dyn Future<Output = Result<DirectoryResponse, Errno>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn readdir<'life0, 'life1, 'async_trait>(
&'life0 self,
req: &'life1 Request,
ino: INodeNo,
file_handle: FileHandle,
size: u32,
offset: u64,
) -> Pin<Box<dyn Future<Output = Result<DirectoryResponse, Errno>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Construct a directory listing response for the given directory inode. This is called by the kernel when it needs to read the contents of a directory.
Sourcefn releasedir<'life0, 'life1, 'async_trait>(
&'life0 self,
req: &'life1 Request,
ino: INodeNo,
fh: FileHandle,
flags: OpenFlags,
) -> Pin<Box<dyn Future<Output = Result<(), Errno>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn releasedir<'life0, 'life1, 'async_trait>(
&'life0 self,
req: &'life1 Request,
ino: INodeNo,
fh: FileHandle,
flags: OpenFlags,
) -> Pin<Box<dyn Future<Output = Result<(), Errno>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Release an open directory.
Sourcefn statfs<'life0, 'life1, 'async_trait>(
&'life0 self,
req: &'life1 Request,
ino: INodeNo,
) -> Pin<Box<dyn Future<Output = Result<StatfsResponse, Errno>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn statfs<'life0, 'life1, 'async_trait>(
&'life0 self,
req: &'life1 Request,
ino: INodeNo,
) -> Pin<Box<dyn Future<Output = Result<StatfsResponse, Errno>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get file system statistics.
Sourcefn setxattr<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
req: &'life1 Request,
ino: INodeNo,
name: &'life2 OsStr,
value: &'life3 [u8],
flags: i32,
position: u32,
) -> Pin<Box<dyn Future<Output = Result<(), Errno>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn setxattr<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
req: &'life1 Request,
ino: INodeNo,
name: &'life2 OsStr,
value: &'life3 [u8],
flags: i32,
position: u32,
) -> Pin<Box<dyn Future<Output = Result<(), Errno>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Set an extended attribute.
Sourcefn getxattr<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
req: &'life1 Request,
ino: INodeNo,
name: &'life2 OsStr,
size: u32,
) -> Pin<Box<dyn Future<Output = Result<XattrResponse, Errno>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn getxattr<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
req: &'life1 Request,
ino: INodeNo,
name: &'life2 OsStr,
size: u32,
) -> Pin<Box<dyn Future<Output = Result<XattrResponse, Errno>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Get an extended attribute.
Sourcefn listxattr<'life0, 'life1, 'async_trait>(
&'life0 self,
req: &'life1 Request,
ino: INodeNo,
size: u32,
) -> Pin<Box<dyn Future<Output = Result<XattrResponse, Errno>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn listxattr<'life0, 'life1, 'async_trait>(
&'life0 self,
req: &'life1 Request,
ino: INodeNo,
size: u32,
) -> Pin<Box<dyn Future<Output = Result<XattrResponse, Errno>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
List extended attribute names.
Sourcefn removexattr<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
req: &'life1 Request,
ino: INodeNo,
name: &'life2 OsStr,
) -> Pin<Box<dyn Future<Output = Result<(), Errno>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn removexattr<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
req: &'life1 Request,
ino: INodeNo,
name: &'life2 OsStr,
) -> Pin<Box<dyn Future<Output = Result<(), Errno>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Remove an extended attribute.
Sourcefn access<'life0, 'life1, 'async_trait>(
&'life0 self,
req: &'life1 Request,
ino: INodeNo,
mask: AccessFlags,
) -> Pin<Box<dyn Future<Output = Result<(), Errno>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn access<'life0, 'life1, 'async_trait>(
&'life0 self,
req: &'life1 Request,
ino: INodeNo,
mask: AccessFlags,
) -> Pin<Box<dyn Future<Output = Result<(), Errno>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Check file access permissions.
Sourcefn create<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
req: &'life1 Request,
parent: INodeNo,
name: &'life2 OsStr,
mode: u32,
umask: u32,
flags: i32,
) -> Pin<Box<dyn Future<Output = Result<CreateResponse, Errno>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn create<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
req: &'life1 Request,
parent: INodeNo,
name: &'life2 OsStr,
mode: u32,
umask: u32,
flags: i32,
) -> Pin<Box<dyn Future<Output = Result<CreateResponse, Errno>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Create and open a file.
Sourcefn fallocate<'life0, 'life1, 'async_trait>(
&'life0 self,
req: &'life1 Request,
ino: INodeNo,
fh: FileHandle,
offset: u64,
length: u64,
mode: i32,
) -> Pin<Box<dyn Future<Output = Result<(), Errno>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn fallocate<'life0, 'life1, 'async_trait>(
&'life0 self,
req: &'life1 Request,
ino: INodeNo,
fh: FileHandle,
offset: u64,
length: u64,
mode: i32,
) -> Pin<Box<dyn Future<Output = Result<(), Errno>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Preallocate or deallocate file space.
Sourcefn copy_file_range<'life0, 'life1, 'async_trait>(
&'life0 self,
req: &'life1 Request,
ino_in: INodeNo,
fh_in: FileHandle,
offset_in: u64,
ino_out: INodeNo,
fh_out: FileHandle,
offset_out: u64,
len: u64,
flags: CopyFileRangeFlags,
) -> Pin<Box<dyn Future<Output = Result<WriteResponse, Errno>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn copy_file_range<'life0, 'life1, 'async_trait>(
&'life0 self,
req: &'life1 Request,
ino_in: INodeNo,
fh_in: FileHandle,
offset_in: u64,
ino_out: INodeNo,
fh_out: FileHandle,
offset_out: u64,
len: u64,
flags: CopyFileRangeFlags,
) -> Pin<Box<dyn Future<Output = Result<WriteResponse, Errno>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Copy a file range.