Struct fuse_backend_rs::api::server::Server
source · pub struct Server<F: FileSystem + Sync> { /* private fields */ }
Expand description
Fuse Server to handle requests from the Fuse client and vhost user master.
Implementations§
source§impl<F: AsyncFileSystem + Sync> Server<F>
impl<F: AsyncFileSystem + Sync> Server<F>
sourcepub async unsafe fn async_handle_message<S: BitmapSlice>(
&self,
r: Reader<'_, S>,
w: Writer<'_, S>,
vu_req: Option<&mut dyn FsCacheReqHandler>,
hook: Option<&dyn MetricsHook>
) -> Result<usize>
pub async unsafe fn async_handle_message<S: BitmapSlice>(
&self,
r: Reader<'_, S>,
w: Writer<'_, S>,
vu_req: Option<&mut dyn FsCacheReqHandler>,
hook: Option<&dyn MetricsHook>
) -> Result<usize>
Main entrance to handle requests from the transport layer.
It receives Fuse requests from transport layers, parses the request according to Fuse ABI, invokes filesystem drivers to server the requests, and eventually send back the result to the transport layer.
Safety
The async io framework borrows underlying buffers from Reader
and Writer
, so the caller
must ensure all data buffers managed by the Reader
and Writer
are valid until the
Future
object returned has completed. Other subsystems, such as the transport layer, rely
on the invariant.
source§impl<F: FileSystem + Sync> Server<F>
impl<F: FileSystem + Sync> Server<F>
sourcepub fn handle_message<S: BitmapSlice>(
&self,
r: Reader<'_, S>,
w: Writer<'_, S>,
vu_req: Option<&mut dyn FsCacheReqHandler>,
hook: Option<&dyn MetricsHook>
) -> Result<usize>
pub fn handle_message<S: BitmapSlice>(
&self,
r: Reader<'_, S>,
w: Writer<'_, S>,
vu_req: Option<&mut dyn FsCacheReqHandler>,
hook: Option<&dyn MetricsHook>
) -> Result<usize>
Main entrance to handle requests from the transport layer.
It receives Fuse requests from transport layers, parses the request according to Fuse ABI, invokes filesystem drivers to server the requests, and eventually send back the result to the transport layer.