pub struct VhostUserGenericHandle {
pub socket: OwnedFd,
pub device_id: u16,
pub queue_sizes: Vec<u16>,
}Expand description
Handle for a generic vhost-user device backed by an external process.
The socket must already be connected. The CLI layer connects to the backend and passes the connected fd here.
For device types with specific handles (FS, BLK), use those instead. This handle is for devices identified only by their numeric virtio device ID.
Fields§
§socket: OwnedFdConnected Unix socket fd to the vhost-user backend.
device_id: u16Virtio device ID (e.g., 2 for block, 1 for net).
queue_sizes: Vec<u16>Per-queue sizes. Length determines the queue count. Required — must be non-empty.
Trait Implementations§
Source§impl DefaultEncoding for VhostUserGenericHandle
impl DefaultEncoding for VhostUserGenericHandle
Source§impl ResourceId<VirtioDeviceHandle> for VhostUserGenericHandle
impl ResourceId<VirtioDeviceHandle> for VhostUserGenericHandle
Source§impl<'encoding> StructDecodeMetadata<'encoding, Resource> for VhostUserGenericHandle
impl<'encoding> StructDecodeMetadata<'encoding, Resource> for VhostUserGenericHandle
Source§impl StructEncodeMetadata<Resource> for VhostUserGenericHandle
impl StructEncodeMetadata<Resource> for VhostUserGenericHandle
Auto Trait Implementations§
impl Freeze for VhostUserGenericHandle
impl RefUnwindSafe for VhostUserGenericHandle
impl Send for VhostUserGenericHandle
impl Sync for VhostUserGenericHandle
impl Unpin for VhostUserGenericHandle
impl UnsafeUnpin for VhostUserGenericHandle
impl UnwindSafe for VhostUserGenericHandle
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T, K> IntoResource<K> for Twhere
T: 'static + ResourceId<K> + MeshPayload + Send,
K: ResourceKind,
impl<T, K> IntoResource<K> for Twhere
T: 'static + ResourceId<K> + MeshPayload + Send,
K: ResourceKind,
§fn into_resource(self) -> Resource<K>
fn into_resource(self) -> Resource<K>
Converts
self into a Resource.§impl<T> MeshField for T
impl<T> MeshField for T
§impl<T> MeshPayload for T
impl<T> MeshPayload for T
§impl<T> SerializeMessage for Twhere
T: 'static + MeshPayload + Send,
impl<T> SerializeMessage for Twhere
T: 'static + MeshPayload + Send,
§fn compute_message_size(&mut self, sizer: MessageSizer<'_>)
fn compute_message_size(&mut self, sizer: MessageSizer<'_>)
Computes the message size, as in [
MessageEncode::compute_message_size].§fn write_message(self, writer: MessageWriter<'_, '_, Resource>)
fn write_message(self, writer: MessageWriter<'_, '_, Resource>)
Writes the message, as in [
MessageEncode::write_message].