pub struct VirtioBlkCountersSnapshot {
pub reads_completed: u64,
pub writes_completed: u64,
pub flushes_completed: u64,
pub bytes_read: u64,
pub bytes_written: u64,
pub throttled_count: u64,
pub io_errors: u64,
pub currently_throttled_gauge: u64,
pub invalid_avail_idx_count: u64,
}Expand description
Plain-u64 snapshot of VirtioBlkCounters taken at VM-result
construction time. Mirrors every atomic field by name.
Decouples the public-facing 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. The worker thread
continues to bump the atomics via the VirtioBlkCounters
record_* mutators; only the result-construction path moves
to the snapshot.
Field semantics match the atomic source one-for-one — see
VirtioBlkCounters for the cumulative-vs-gauge taxonomy
distinguishing each field. The live-gauge field
currently_throttled_gauge reflects the gauge state at
snapshot time — typically 0 after a clean shutdown, but
per the VirtioBlkCounters doc a worker-strand stall
during teardown can leave a non-zero residual.
Fields§
§reads_completed: u64§writes_completed: u64§flushes_completed: u64§bytes_read: u64§bytes_written: u64§throttled_count: u64§io_errors: u64§currently_throttled_gauge: u64§invalid_avail_idx_count: u64Trait Implementations§
Source§impl Clone for VirtioBlkCountersSnapshot
impl Clone for VirtioBlkCountersSnapshot
Source§fn clone(&self) -> VirtioBlkCountersSnapshot
fn clone(&self) -> VirtioBlkCountersSnapshot
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for VirtioBlkCountersSnapshot
impl Debug for VirtioBlkCountersSnapshot
Source§impl Default for VirtioBlkCountersSnapshot
impl Default for VirtioBlkCountersSnapshot
Source§fn default() -> VirtioBlkCountersSnapshot
fn default() -> VirtioBlkCountersSnapshot
Source§impl<'de> Deserialize<'de> for VirtioBlkCountersSnapshot
impl<'de> Deserialize<'de> for VirtioBlkCountersSnapshot
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>,
Source§impl Hash for VirtioBlkCountersSnapshot
impl Hash for VirtioBlkCountersSnapshot
impl Eq for VirtioBlkCountersSnapshot
impl StructuralPartialEq for VirtioBlkCountersSnapshot
Auto Trait Implementations§
impl Freeze for VirtioBlkCountersSnapshot
impl RefUnwindSafe for VirtioBlkCountersSnapshot
impl Send for VirtioBlkCountersSnapshot
impl Sync for VirtioBlkCountersSnapshot
impl Unpin for VirtioBlkCountersSnapshot
impl UnwindSafe for VirtioBlkCountersSnapshot
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,
§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
§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
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
§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
§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>
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>
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