pub struct VirtioNetCountersSnapshot {Show 16 fields
pub tx_packets: u64,
pub tx_bytes: u64,
pub rx_packets: u64,
pub rx_bytes: u64,
pub tx_dropped_no_rx_buffer: u64,
pub tx_dropped_rx_poisoned: u64,
pub tx_chain_invalid: u64,
pub tx_oversize_dropped: u64,
pub rx_chain_invalid: u64,
pub rx_write_failed: u64,
pub tx_add_used_failures: u64,
pub rx_add_used_failures: u64,
pub invalid_avail_idx_count: u64,
pub ctrl_mq_set: u64,
pub ctrl_chain_invalid: u64,
pub ctrl_add_used_failures: u64,
}Expand description
Plain-u64 snapshot of VirtioNetCounters taken at VM-result
construction time. Mirrors every atomic field by name.
Decouples crate::vmm::VmResult from the internal
atomic-shared writer state — consumers see immutable owned
data they can Clone, compare, and round-trip through serde
without the Arc<AtomicU64> ceremony. virtio-net is
single-threaded — the vCPU thread continues to bump the
atomics inline from process_tx_loopback via the
VirtioNetCounters record_* mutators; only the
result-construction path moves to the snapshot.
Field semantics match the atomic source one-for-one — see
VirtioNetCounters for the per-counter taxonomy.
Fields§
§tx_packets: u64§tx_bytes: u64§rx_packets: u64§rx_bytes: u64§tx_dropped_no_rx_buffer: u64§tx_dropped_rx_poisoned: u64§tx_chain_invalid: u64§tx_oversize_dropped: u64§rx_chain_invalid: u64§rx_write_failed: u64§tx_add_used_failures: u64§rx_add_used_failures: u64§invalid_avail_idx_count: u64§ctrl_mq_set: u64§ctrl_chain_invalid: u64§ctrl_add_used_failures: u64Trait Implementations§
Source§impl Clone for VirtioNetCountersSnapshot
impl Clone for VirtioNetCountersSnapshot
Source§fn clone(&self) -> VirtioNetCountersSnapshot
fn clone(&self) -> VirtioNetCountersSnapshot
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 VirtioNetCountersSnapshot
impl Debug for VirtioNetCountersSnapshot
Source§impl Default for VirtioNetCountersSnapshot
impl Default for VirtioNetCountersSnapshot
Source§fn default() -> VirtioNetCountersSnapshot
fn default() -> VirtioNetCountersSnapshot
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for VirtioNetCountersSnapshot
impl<'de> Deserialize<'de> for VirtioNetCountersSnapshot
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Hash for VirtioNetCountersSnapshot
impl Hash for VirtioNetCountersSnapshot
impl Eq for VirtioNetCountersSnapshot
impl StructuralPartialEq for VirtioNetCountersSnapshot
Auto Trait Implementations§
impl Freeze for VirtioNetCountersSnapshot
impl RefUnwindSafe for VirtioNetCountersSnapshot
impl Send for VirtioNetCountersSnapshot
impl Sync for VirtioNetCountersSnapshot
impl Unpin for VirtioNetCountersSnapshot
impl UnwindSafe for VirtioNetCountersSnapshot
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. 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>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more