[][src]Struct fuser::Session

pub struct Session<FS: Filesystem> {
    pub filesystem: FS,
    pub proto_major: u32,
    pub proto_minor: u32,
    pub initialized: bool,
    pub destroyed: bool,
    // some fields omitted
}

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

impl<FS: Filesystem> Session<FS>[src]

pub fn new(
    filesystem: FS,
    mountpoint: &Path,
    options: &[&OsStr]
) -> Result<Session<FS>>
[src]

Create a new session by mounting the given filesystem to the given mountpoint

pub fn mountpoint(&self) -> &Path[src]

Return path of the mounted filesystem

pub fn run(&mut self) -> Result<()>[src]

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.

impl<'a, FS: Filesystem + Send + 'a> Session<FS>[src]

pub unsafe fn spawn(self) -> Result<BackgroundSession<'a>>[src]

Run the session loop in a background thread

Trait Implementations

impl<FS: Debug + Filesystem> Debug for Session<FS>[src]

impl<FS: Filesystem> Drop for Session<FS>[src]

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.