VirtioFsDevice

Struct VirtioFsDevice 

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

A virtio-fs PCI device.

Implementations§

Source§

impl VirtioFsDevice

Source

pub fn new<Fs>( driver_source: &VmTaskDriverSource, tag: &str, fs: Fs, shmem_size: u64, notify_corruption: Option<Arc<dyn Fn() + Sync + Send>>, ) -> Self
where Fs: 'static + Fuse + Send + Sync,

Creates a new VirtioFsDevice with the specified mount tag.

Trait Implementations§

Source§

impl InspectMut for VirtioFsDevice

Source§

fn inspect_mut(&mut self, req: Request<'_>)

Inspects the object.
Source§

impl VirtioDevice for VirtioFsDevice

Source§

fn traits(&self) -> DeviceTraits

Device identity and capabilities.
Source§

async fn read_registers_u32(&mut self, offset: u16) -> u32

Read device-specific config registers.
Source§

async fn write_registers_u32(&mut self, offset: u16, val: u32)

Write device-specific config registers.
Source§

fn set_shared_memory_region( &mut self, region: &Arc<dyn MappedMemoryRegion>, ) -> Result<()>

Provide the shared memory region to the device. Read more
Source§

async fn start_queue( &mut self, idx: u16, resources: QueueResources, features: &VirtioDeviceFeatures, initial_state: Option<QueueState>, ) -> Result<()>

Start a single queue. Read more
Source§

async fn stop_queue(&mut self, idx: u16) -> Option<QueueState>

Stop a single queue and return its state. Read more
Source§

async fn reset(&mut self)

Reset device-internal state to initial values. Read more
§

fn queue_size(&self, _queue_index: u16) -> u16

The queue size for the given queue index. Read more
§

fn supports_save_restore(&self) -> bool

Whether the device supports save/restore. Read more

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
§

impl<T> DynVirtioDevice for T
where T: VirtioDevice,

§

fn traits(&self) -> DeviceTraits

Device identity and capabilities.
§

fn queue_size(&self, queue_index: u16) -> u16

The queue size for the given queue index.
§

fn read_registers_u32( &mut self, offset: u16, ) -> Pin<Box<dyn Future<Output = u32> + Send + '_>>

Read device-specific config registers.
§

fn write_registers_u32( &mut self, offset: u16, val: u32, ) -> Pin<Box<dyn Future<Output = ()> + Send + '_>>

Write device-specific config registers.
§

fn set_shared_memory_region( &mut self, region: &Arc<dyn MappedMemoryRegion>, ) -> Result<(), Error>

Provide the shared memory region to the device.
§

fn start_queue<'a>( &'a mut self, idx: u16, resources: QueueResources, features: &'a VirtioDeviceFeatures, initial_state: Option<QueueState>, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'a>>

Start a single queue.
§

fn stop_queue( &mut self, idx: u16, ) -> Pin<Box<dyn Future<Output = Option<QueueState>> + Send + '_>>

Stop a single queue and return its state.
§

fn reset(&mut self) -> Pin<Box<dyn Future<Output = ()> + Send + '_>>

Reset device-internal state.
§

fn supports_save_restore(&self) -> bool

Whether the device supports save/restore.
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