fuse

Struct Connection

Source
pub struct Connection { /* private fields */ }
Expand description

A simple driver for a FUSE session using /dev/fuse.

Since this library is primarily intended for virtio-fs, /dev/fuse support is for testing purposes only, and the functionality is limited.

Implementations§

Source§

impl Connection

Source

pub fn mount(mount_point: impl AsRef<Path>) -> Result<Self>

Creates a new Connection by mounting a file system.

Source

pub fn unmount(mount_point: impl AsRef<Path>, flags: i32) -> Result<()>

Source

pub fn run<T: 'static + Fuse + Send + Sync>(&mut self, fs: T) -> Result<()>

Create a FUSE session and run it until the file system is unmounted.

Trait Implementations§

Source§

impl ReplySender for Connection

Source§

fn send(&mut self, bufs: &[IoSlice<'_>]) -> Result<()>

Send the specified buffers to the kernel.
Source§

fn send_empty(&mut self, unique: u64) -> Result<()>

Send an empty reply.
Source§

fn send_arg<T: Debug + IntoBytes + Immutable + KnownLayout>( &mut self, unique: u64, arg: T, ) -> Result<()>

Send a reply with a struct as an argument.
Source§

fn send_error(&mut self, unique: u64, error: i32) -> Result<()>

Send an error reply.
Source§

fn send_data(&mut self, unique: u64, data: &[u8]) -> Result<()>

Send a reply with arbitrary data.
Source§

fn send_arg_data<T: Debug + IntoBytes + Immutable + KnownLayout>( &mut self, unique: u64, arg: T, data: &[u8], ) -> Result<()>

Send a reply with a struct argument and arbitrary data.
Source§

fn send_string(&mut self, unique: u64, value: LxString) -> Result<()>

Send a string reply.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more