Struct drakey_fuse::Session
source · pub struct Session<FS: Filesystem> {
pub filesystem: FS,
pub proto_major: u32,
pub proto_minor: u32,
pub initialized: bool,
pub destroyed: bool,
/* private fields */
}
Expand description
The session data structure
Fields
filesystem: FS
Filesystem operation implementations
proto_major: u32
FUSE protocol major version
proto_minor: u32
FUSE protocol minor version
initialized: bool
True if the filesystem is initialized (init operation done)
destroyed: bool
True if the filesystem was destroyed (destroy operation done)
Implementations
sourceimpl<FS: Filesystem> Session<FS>
impl<FS: Filesystem> Session<FS>
sourcepub fn new(
filesystem: FS,
mountpoint: &Path,
options: &[&OsStr]
) -> Result<Session<FS>>
pub fn new(
filesystem: FS,
mountpoint: &Path,
options: &[&OsStr]
) -> Result<Session<FS>>
Create a new session by mounting the given filesystem to the given mountpoint
sourcepub fn mountpoint(&self) -> &Path
pub fn mountpoint(&self) -> &Path
Return path of the mounted filesystem
sourcepub fn run(&mut self) -> Result<()>
pub fn run(&mut self) -> Result<()>
Run the session loop that receives kernel requests and dispatches them to method calls into the filesystem. This read-dispatch-loop is non-concurrent to prevent having multiple buffers (which take up much memory), but the filesystem methods may run concurrent by spawning threads.
sourceimpl<'a, FS: Filesystem + Send + 'a> Session<FS>
impl<'a, FS: Filesystem + Send + 'a> Session<FS>
sourcepub unsafe fn spawn(self) -> Result<BackgroundSession<'a>>
pub unsafe fn spawn(self) -> Result<BackgroundSession<'a>>
Run the session loop in a background thread
Trait Implementations
sourceimpl<FS: Debug + Filesystem> Debug for Session<FS>
impl<FS: Debug + Filesystem> Debug for Session<FS>
Auto Trait Implementations
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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more