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: u16
The maximum size in elements offered by the device.
next_avail: u16
Tail position of the available ring.
next_used: u16
Head position of the used ring.
event_idx_enabled: bool
VIRTIO_F_RING_EVENT_IDX negotiated.
size: u16
The queue size in elements the driver selected.
ready: bool
Indicates if the queue is finished with configuration.
desc_table: u64
Guest physical address of the descriptor table.
avail_ring: u64
Guest physical address of the available ring.
used_ring: u64
Guest physical address of the used ring.
Trait Implementations§
source§impl Clone for QueueState
impl Clone for QueueState
source§fn clone(&self) -> QueueState
fn clone(&self) -> QueueState
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for QueueState
impl Debug for QueueState
source§impl Default for QueueState
impl Default for QueueState
source§fn default() -> QueueState
fn default() -> QueueState
source§impl PartialEq for QueueState
impl PartialEq for QueueState
source§impl TryFrom<QueueState> for Queue
impl TryFrom<QueueState> for Queue
impl Copy for QueueState
impl Eq for QueueState
impl StructuralPartialEq for QueueState
Auto Trait Implementations§
impl Freeze for QueueState
impl RefUnwindSafe for QueueState
impl Send for QueueState
impl Sync for QueueState
impl Unpin for QueueState
impl UnwindSafe for QueueState
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)