pub struct FuseFS {
repo: Repository<IndexedFullStatus>,
vfs: Vfs,
open_files: RwLock<BTreeMap<u64, OpenFile>>,
now: SystemTime,
file_policy: FilePolicy,
}Fields§
§repo: Repository<IndexedFullStatus>§vfs: Vfs§open_files: RwLock<BTreeMap<u64, OpenFile>>§now: SystemTime§file_policy: FilePolicyImplementations§
Source§impl FuseFS
impl FuseFS
pub(crate) fn new( repo: Repository<IndexedFullStatus>, vfs: Vfs, file_policy: FilePolicy, ) -> Self
fn node_from_path(&self, path: &Path) -> Result<Node, i32>
fn dir_entries_from_path(&self, path: &Path) -> Result<Vec<Node>, i32>
Trait Implementations§
Source§impl FilesystemMT for FuseFS
impl FilesystemMT for FuseFS
Source§fn getattr(
&self,
_req: RequestInfo,
path: &Path,
_fh: Option<u64>,
) -> ResultEntry
fn getattr( &self, _req: RequestInfo, path: &Path, _fh: Option<u64>, ) -> ResultEntry
Get the attributes of a filesystem entry. Read more
Source§fn readlink(&self, _req: RequestInfo, path: &Path) -> ResultData
fn readlink(&self, _req: RequestInfo, path: &Path) -> ResultData
Read a symbolic link.
Source§fn open(&self, _req: RequestInfo, path: &Path, _flags: u32) -> ResultOpen
fn open(&self, _req: RequestInfo, path: &Path, _flags: u32) -> ResultOpen
Open a file. Read more
Source§fn release(
&self,
_req: RequestInfo,
_path: &Path,
fh: u64,
_flags: u32,
_lock_owner: u64,
_flush: bool,
) -> ResultEmpty
fn release( &self, _req: RequestInfo, _path: &Path, fh: u64, _flags: u32, _lock_owner: u64, _flush: bool, ) -> ResultEmpty
Called when an open file is closed. Read more
Source§fn read(
&self,
_req: RequestInfo,
_path: &Path,
fh: u64,
offset: u64,
size: u32,
callback: impl FnOnce(ResultSlice<'_>) -> CallbackResult,
) -> CallbackResult
fn read( &self, _req: RequestInfo, _path: &Path, fh: u64, offset: u64, size: u32, callback: impl FnOnce(ResultSlice<'_>) -> CallbackResult, ) -> CallbackResult
Read from a file. Read more
Source§fn opendir(&self, _req: RequestInfo, _path: &Path, _flags: u32) -> ResultOpen
fn opendir(&self, _req: RequestInfo, _path: &Path, _flags: u32) -> ResultOpen
Open a directory. Read more
Source§fn readdir(&self, _req: RequestInfo, path: &Path, _fh: u64) -> ResultReaddir
fn readdir(&self, _req: RequestInfo, path: &Path, _fh: u64) -> ResultReaddir
Get the entries of a directory. Read more
Source§fn releasedir(
&self,
_req: RequestInfo,
_path: &Path,
_fh: u64,
_flags: u32,
) -> ResultEmpty
fn releasedir( &self, _req: RequestInfo, _path: &Path, _fh: u64, _flags: u32, ) -> ResultEmpty
Close an open directory. Read more
Source§fn listxattr(&self, _req: RequestInfo, path: &Path, size: u32) -> ResultXattr
fn listxattr(&self, _req: RequestInfo, path: &Path, size: u32) -> ResultXattr
List extended attributes for a file. Read more
Source§fn getxattr(
&self,
_req: RequestInfo,
path: &Path,
name: &OsStr,
size: u32,
) -> ResultXattr
fn getxattr( &self, _req: RequestInfo, path: &Path, name: &OsStr, size: u32, ) -> ResultXattr
Get a file extended attribute. Read more
Source§fn init(&self, _req: RequestInfo) -> Result<(), i32>
fn init(&self, _req: RequestInfo) -> Result<(), i32>
Called on mount, before any other function.
Source§fn chmod(
&self,
_req: RequestInfo,
_path: &Path,
_fh: Option<u64>,
_mode: u32,
) -> Result<(), i32>
fn chmod( &self, _req: RequestInfo, _path: &Path, _fh: Option<u64>, _mode: u32, ) -> Result<(), i32>
Change the mode of a filesystem entry. Read more
Source§fn chown(
&self,
_req: RequestInfo,
_path: &Path,
_fh: Option<u64>,
_uid: Option<u32>,
_gid: Option<u32>,
) -> Result<(), i32>
fn chown( &self, _req: RequestInfo, _path: &Path, _fh: Option<u64>, _uid: Option<u32>, _gid: Option<u32>, ) -> Result<(), i32>
Change the owner UID and/or group GID of a filesystem entry. Read more
Source§fn truncate(
&self,
_req: RequestInfo,
_path: &Path,
_fh: Option<u64>,
_size: u64,
) -> Result<(), i32>
fn truncate( &self, _req: RequestInfo, _path: &Path, _fh: Option<u64>, _size: u64, ) -> Result<(), i32>
Set the length of a file. Read more
Source§fn utimens(
&self,
_req: RequestInfo,
_path: &Path,
_fh: Option<u64>,
_atime: Option<SystemTime>,
_mtime: Option<SystemTime>,
) -> Result<(), i32>
fn utimens( &self, _req: RequestInfo, _path: &Path, _fh: Option<u64>, _atime: Option<SystemTime>, _mtime: Option<SystemTime>, ) -> Result<(), i32>
Set timestamps of a filesystem entry. Read more
Source§fn utimens_macos(
&self,
_req: RequestInfo,
_path: &Path,
_fh: Option<u64>,
_crtime: Option<SystemTime>,
_chgtime: Option<SystemTime>,
_bkuptime: Option<SystemTime>,
_flags: Option<u32>,
) -> Result<(), i32>
fn utimens_macos( &self, _req: RequestInfo, _path: &Path, _fh: Option<u64>, _crtime: Option<SystemTime>, _chgtime: Option<SystemTime>, _bkuptime: Option<SystemTime>, _flags: Option<u32>, ) -> Result<(), i32>
Set timestamps of a filesystem entry (with extra options only used on MacOS).
Source§fn mknod(
&self,
_req: RequestInfo,
_parent: &Path,
_name: &OsStr,
_mode: u32,
_rdev: u32,
) -> Result<(Duration, FileAttr), i32>
fn mknod( &self, _req: RequestInfo, _parent: &Path, _name: &OsStr, _mode: u32, _rdev: u32, ) -> Result<(Duration, FileAttr), i32>
Create a special file. Read more
Source§fn mkdir(
&self,
_req: RequestInfo,
_parent: &Path,
_name: &OsStr,
_mode: u32,
) -> Result<(Duration, FileAttr), i32>
fn mkdir( &self, _req: RequestInfo, _parent: &Path, _name: &OsStr, _mode: u32, ) -> Result<(Duration, FileAttr), i32>
Create a directory. Read more
Source§fn unlink(
&self,
_req: RequestInfo,
_parent: &Path,
_name: &OsStr,
) -> Result<(), i32>
fn unlink( &self, _req: RequestInfo, _parent: &Path, _name: &OsStr, ) -> Result<(), i32>
Remove a file. Read more
Source§fn rmdir(
&self,
_req: RequestInfo,
_parent: &Path,
_name: &OsStr,
) -> Result<(), i32>
fn rmdir( &self, _req: RequestInfo, _parent: &Path, _name: &OsStr, ) -> Result<(), i32>
Remove a directory. Read more
Source§fn symlink(
&self,
_req: RequestInfo,
_parent: &Path,
_name: &OsStr,
_target: &Path,
) -> Result<(Duration, FileAttr), i32>
fn symlink( &self, _req: RequestInfo, _parent: &Path, _name: &OsStr, _target: &Path, ) -> Result<(Duration, FileAttr), i32>
Create a symbolic link. Read more
Source§fn rename(
&self,
_req: RequestInfo,
_parent: &Path,
_name: &OsStr,
_newparent: &Path,
_newname: &OsStr,
) -> Result<(), i32>
fn rename( &self, _req: RequestInfo, _parent: &Path, _name: &OsStr, _newparent: &Path, _newname: &OsStr, ) -> Result<(), i32>
Rename a filesystem entry. Read more
Source§fn link(
&self,
_req: RequestInfo,
_path: &Path,
_newparent: &Path,
_newname: &OsStr,
) -> Result<(Duration, FileAttr), i32>
fn link( &self, _req: RequestInfo, _path: &Path, _newparent: &Path, _newname: &OsStr, ) -> Result<(Duration, FileAttr), i32>
Create a hard link. Read more
Source§fn write(
&self,
_req: RequestInfo,
_path: &Path,
_fh: u64,
_offset: u64,
_data: Vec<u8>,
_flags: u32,
) -> Result<u32, i32>
fn write( &self, _req: RequestInfo, _path: &Path, _fh: u64, _offset: u64, _data: Vec<u8>, _flags: u32, ) -> Result<u32, i32>
Write to a file. Read more
Source§fn flush(
&self,
_req: RequestInfo,
_path: &Path,
_fh: u64,
_lock_owner: u64,
) -> Result<(), i32>
fn flush( &self, _req: RequestInfo, _path: &Path, _fh: u64, _lock_owner: u64, ) -> Result<(), i32>
Called each time a program calls
close on an open file. Read moreSource§fn fsync(
&self,
_req: RequestInfo,
_path: &Path,
_fh: u64,
_datasync: bool,
) -> Result<(), i32>
fn fsync( &self, _req: RequestInfo, _path: &Path, _fh: u64, _datasync: bool, ) -> Result<(), i32>
Write out any pending changes of a file. Read more
Source§fn fsyncdir(
&self,
_req: RequestInfo,
_path: &Path,
_fh: u64,
_datasync: bool,
) -> Result<(), i32>
fn fsyncdir( &self, _req: RequestInfo, _path: &Path, _fh: u64, _datasync: bool, ) -> Result<(), i32>
Write out any pending changes to a directory. Read more
Source§fn statfs(&self, _req: RequestInfo, _path: &Path) -> Result<Statfs, i32>
fn statfs(&self, _req: RequestInfo, _path: &Path) -> Result<Statfs, i32>
Get filesystem statistics. Read more
Source§fn setxattr(
&self,
_req: RequestInfo,
_path: &Path,
_name: &OsStr,
_value: &[u8],
_flags: u32,
_position: u32,
) -> Result<(), i32>
fn setxattr( &self, _req: RequestInfo, _path: &Path, _name: &OsStr, _value: &[u8], _flags: u32, _position: u32, ) -> Result<(), i32>
Set a file extended attribute. Read more
Source§fn removexattr(
&self,
_req: RequestInfo,
_path: &Path,
_name: &OsStr,
) -> Result<(), i32>
fn removexattr( &self, _req: RequestInfo, _path: &Path, _name: &OsStr, ) -> Result<(), i32>
Remove an extended attribute for a file. Read more
Auto Trait Implementations§
impl !Freeze for FuseFS
impl !RefUnwindSafe for FuseFS
impl !UnwindSafe for FuseFS
impl Send for FuseFS
impl Sync for FuseFS
impl Unpin for FuseFS
impl UnsafeUnpin for FuseFS
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more