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: &Config,
) -> Result<Session<FS>>
pub fn new<P: AsRef<Path>>( filesystem: FS, mountpoint: P, options: &Config, ) -> Result<Session<FS>>
Create a new session by mounting the given filesystem to the given mountpoint
§Errors
Returns an error if the options are incorrect, or if the fuse device can’t be mounted.
Sourcepub fn from_fd(
filesystem: FS,
fd: OwnedFd,
acl: SessionACL,
config: Config,
) -> Result<Self>
pub fn from_fd( filesystem: FS, fd: OwnedFd, acl: SessionACL, config: Config, ) -> Result<Self>
Wrap an existing /dev/fuse file descriptor. This doesn’t mount the filesystem anywhere; that must be done separately.
Sourcepub fn spawn(self) -> Result<BackgroundSession>
pub fn spawn(self) -> Result<BackgroundSession>
Run the session loop in a background thread. If the returned handle is dropped, the filesystem is unmounted and the given session ends.
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
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>where
FS: Freeze,
impl<FS> !RefUnwindSafe for Session<FS>
impl<FS> Send for Session<FS>
impl<FS> Sync for Session<FS>
impl<FS> Unpin for Session<FS>where
FS: Unpin,
impl<FS> !UnwindSafe for Session<FS>
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