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§
Provided Methods§
Sourcefn with_writer<F>(&mut self, f: F)where
F: FnOnce(FuseDevWriter<'_>),
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.
Sourcefn try_with_writer<F, R, E>(&mut self, f: F) -> Result<R, E>
fn try_with_writer<F, R, E>(&mut self, f: F) -> Result<R, E>
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.