Struct fuse::Session
[−]
[src]
pub struct Session<FS: Filesystem> { pub filesystem: FS, pub proto_major: u32, pub proto_minor: u32, pub initialized: bool, pub destroyed: bool, pub splice_write: bool, pub max_background: u16, pub congestion_threshold: u16, // 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)
splice_write: bool
True, if splice() syscall should be used for /dev/fuse
max_background: u16
Number of queued requests in the kernel
congestion_threshold: u16
Threshold when waiting fuse users are put into sleep state instead of busy loop
Methods
impl<FS: Filesystem> Session<FS>
[src]
pub fn new_from_fd(
filesystem: FS,
fd: RawFd,
mountpoint: &Path,
splice_write: bool,
max_background: u16,
congestion_threshold: u16
) -> Result<Session<FS>>
[src]
filesystem: FS,
fd: RawFd,
mountpoint: &Path,
splice_write: bool,
max_background: u16,
congestion_threshold: u16
) -> Result<Session<FS>>
Create a new session by using a file descriptor "/dev/fuse"
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]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more