Struct virtio_queue::QueueState
source · [−]pub struct QueueState {
pub max_size: u16,
pub next_avail: u16,
pub next_used: u16,
pub event_idx_enabled: bool,
pub size: u16,
pub ready: bool,
pub desc_table: u64,
pub avail_ring: u64,
pub used_ring: u64,
}Expand description
Representation of the Queue state.
The QueueState represents the pure state of the queue without tracking any implementation
details of the queue. The goal with this design is to minimize the changes required to the
state, and thus the required transitions between states when upgrading or downgrading.
In practice this means that the QueueState consists solely of POD (Plain Old Data).
As this structure has all the fields public it is consider to be untrusted. A validated
queue can be created from the state by calling the associated try_from function.
Fields
max_size: u16The maximum size in elements offered by the device.
next_avail: u16Tail position of the available ring.
next_used: u16Head position of the used ring.
event_idx_enabled: boolVIRTIO_F_RING_EVENT_IDX negotiated.
size: u16The queue size in elements the driver selected.
ready: boolIndicates if the queue is finished with configuration.
desc_table: u64Guest physical address of the descriptor table.
avail_ring: u64Guest physical address of the available ring.
used_ring: u64Guest physical address of the used ring.
Trait Implementations
sourceimpl Clone for QueueState
impl Clone for QueueState
sourcefn clone(&self) -> QueueState
fn clone(&self) -> QueueState
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for QueueState
impl Debug for QueueState
sourceimpl Default for QueueState
impl Default for QueueState
sourcefn default() -> QueueState
fn default() -> QueueState
Returns the “default value” for a type. Read more
sourceimpl PartialEq<QueueState> for QueueState
impl PartialEq<QueueState> for QueueState
sourcefn eq(&self, other: &QueueState) -> bool
fn eq(&self, other: &QueueState) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &QueueState) -> bool
fn ne(&self, other: &QueueState) -> bool
This method tests for !=.
sourceimpl TryFrom<QueueState> for Queue
impl TryFrom<QueueState> for Queue
impl Copy for QueueState
impl StructuralPartialEq for QueueState
Auto Trait Implementations
impl RefUnwindSafe for QueueState
impl Send for QueueState
impl Sync for QueueState
impl Unpin for QueueState
impl UnwindSafe for QueueState
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more