#[repr(C)]pub struct VirtQueueUsed {
pub flags: u16,
pub idx: u16,
}Expand description
VirtIO used ring header structure.
This structure represents the memory layout of the used ring header in guest memory according to the VirtIO specification. It is a simple C-compatible data structure that directly maps to guest memory.
The complete used ring in guest memory consists of:
- This header structure (VirtQueueUsed)
- An array of used elements (ring[\queue_size], each VirtqUsedElem)
- An optional avail_event field (if VIRTIO_F_EVENT_IDX is negotiated)
This structure is used by UsedRing to read/write the header portion
of the used ring through guest memory accessor.
Fields§
§flags: u16Flags
idx: u16Index of the next used element
Implementations§
Trait Implementations§
Source§impl Clone for VirtQueueUsed
impl Clone for VirtQueueUsed
Source§fn clone(&self) -> VirtQueueUsed
fn clone(&self) -> VirtQueueUsed
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for VirtQueueUsed
impl Debug for VirtQueueUsed
Source§impl Default for VirtQueueUsed
impl Default for VirtQueueUsed
Source§fn default() -> VirtQueueUsed
fn default() -> VirtQueueUsed
Returns the “default value” for a type. Read more
impl Copy for VirtQueueUsed
Auto Trait Implementations§
impl Freeze for VirtQueueUsed
impl RefUnwindSafe for VirtQueueUsed
impl Send for VirtQueueUsed
impl Sync for VirtQueueUsed
impl Unpin for VirtQueueUsed
impl UnwindSafe for VirtQueueUsed
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