FuseSessionExt

Trait FuseSessionExt 

Source
pub trait FuseSessionExt {
    // Required methods
    fn file(&self) -> Option<&File>;
    fn bufsize(&self) -> usize;

    // Provided methods
    fn with_writer<F>(&mut self, f: F)
       where F: FnOnce(FuseDevWriter<'_>) { ... }
    fn try_with_writer<F, R, E>(&mut self, f: F) -> Result<R, E>
       where F: FnOnce(FuseDevWriter<'_>) -> Result<R, E>,
             E: From<Error> { ... }
}
Expand description

Extension trait for FuseSession to provide helper methods.

Required Methods§

Source

fn file(&self) -> Option<&File>

Get the underlying file of the fuse session.

Source

fn bufsize(&self) -> usize

Get the buffer size of the fuse session.

Provided Methods§

Source

fn with_writer<F>(&mut self, f: F)
where F: FnOnce(FuseDevWriter<'_>),

Create a new fuse message writer and pass it to the given closure.

Source

fn try_with_writer<F, R, E>(&mut self, f: F) -> Result<R, E>
where F: FnOnce(FuseDevWriter<'_>) -> Result<R, E>, E: From<Error>,

Create a new fuse message writer and pass it to the given closure. and return the result from the closure.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§