#[repr(C)]pub struct VirtQueueAvail {
pub flags: u16,
pub idx: u16,
}Expand description
VirtIO available ring header structure.
This structure represents the memory layout of the available 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 available ring in guest memory consists of:
- This header structure (VirtQueueAvail)
- An array of descriptor indices (ring[\queue_size])
- An optional used_event field (if VIRTIO_F_EVENT_IDX is negotiated)
This structure is used by AvailableRing to read/write the header portion
of the available ring through guest memory accessor.
Fields§
§flags: u16Flags
idx: u16Index of the next available descriptor
Implementations§
Source§impl VirtQueueAvail
impl VirtQueueAvail
Sourcepub fn no_interrupt(&self) -> bool
pub fn no_interrupt(&self) -> bool
Check if interrupts are disabled
Sourcepub fn set_no_interrupt(&mut self, no_interrupt: bool)
pub fn set_no_interrupt(&mut self, no_interrupt: bool)
Set the no interrupt flag
Trait Implementations§
Source§impl Clone for VirtQueueAvail
impl Clone for VirtQueueAvail
Source§fn clone(&self) -> VirtQueueAvail
fn clone(&self) -> VirtQueueAvail
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 VirtQueueAvail
impl Debug for VirtQueueAvail
Source§impl Default for VirtQueueAvail
impl Default for VirtQueueAvail
Source§fn default() -> VirtQueueAvail
fn default() -> VirtQueueAvail
Returns the “default value” for a type. Read more
impl Copy for VirtQueueAvail
Auto Trait Implementations§
impl Freeze for VirtQueueAvail
impl RefUnwindSafe for VirtQueueAvail
impl Send for VirtQueueAvail
impl Sync for VirtQueueAvail
impl Unpin for VirtQueueAvail
impl UnwindSafe for VirtQueueAvail
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