pub struct Session<FS: Filesystem> { /* private fields */ }Expand description
The session data structure
Implementations§
Source§impl<FS: Filesystem> Session<FS>
impl<FS: Filesystem> Session<FS>
Sourcepub fn new<P: AsRef<Path>>(
filesystem: FS,
mountpoint: P,
options: &[MountOption],
) -> Result<Session<FS>>
pub fn new<P: AsRef<Path>>( filesystem: FS, mountpoint: P, options: &[MountOption], ) -> Result<Session<FS>>
Create a new session by mounting the given filesystem to the given mountpoint
Sourcepub fn from_fd(filesystem: FS, fd: OwnedFd, acl: SessionACL) -> Self
pub fn from_fd(filesystem: FS, fd: OwnedFd, acl: SessionACL) -> Self
Wrap an existing /dev/fuse file descriptor. This doesn’t mount the filesystem anywhere; that must be done separately.
Sourcepub fn run(&self) -> Result<()>
pub fn run(&self) -> Result<()>
Run the session loop that receives kernel requests and dispatches them to method calls into the filesystem.
Sourcepub fn run_with_callbacks<FA, FB>(
&self,
before_dispatch: FB,
after_dispatch: FA,
clone_fuse_fd: bool,
) -> Result<()>
pub fn run_with_callbacks<FA, FB>( &self, before_dispatch: FB, after_dispatch: FA, clone_fuse_fd: bool, ) -> Result<()>
Run the session loop that receives kernel requests and dispatches them to method calls into the filesystem. This version also notifies callers of kernel requests before and after they are dispatched to the filesystem.
Sourcepub fn unmount_callable(&mut self) -> SessionUnmounter
pub fn unmount_callable(&mut self) -> SessionUnmounter
Returns a thread-safe object that can be used to unmount the Filesystem
Source§impl<FS: 'static + Filesystem + Send> Session<FS>
impl<FS: 'static + Filesystem + Send> Session<FS>
Sourcepub fn spawn(self) -> Result<BackgroundSession>
pub fn spawn(self) -> Result<BackgroundSession>
Run the session loop in a background thread
Trait Implementations§
Source§impl<FS: Filesystem> AsFd for Session<FS>
impl<FS: Filesystem> AsFd for Session<FS>
Source§fn as_fd(&self) -> BorrowedFd<'_>
fn as_fd(&self) -> BorrowedFd<'_>
Borrows the file descriptor. Read more
Auto Trait Implementations§
impl<FS> !Freeze for Session<FS>
impl<FS> RefUnwindSafe for Session<FS>where
FS: RefUnwindSafe,
impl<FS> Send for Session<FS>where
FS: Send,
impl<FS> Sync for Session<FS>where
FS: Sync,
impl<FS> Unpin for Session<FS>where
FS: Unpin,
impl<FS> UnwindSafe for Session<FS>where
FS: UnwindSafe,
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