pub struct LegacySnapshot {
pub snapshot_id: u64,
pub kind: SnapshotKind,
pub created_at_secs: u64,
pub entries: Vec<LegacySnapshotEntry>,
pub parent_id: Option<u64>,
}Expand description
An immutable point-in-time view of a set of storage blocks (legacy API).
Fields§
§snapshot_id: u64Unique, monotonically-increasing identifier assigned by the manager.
kind: SnapshotKindWhat subset of blocks this snapshot captures.
created_at_secs: u64Unix timestamp (seconds since epoch) at which this snapshot was taken.
entries: Vec<LegacySnapshotEntry>The block entries recorded in this snapshot.
parent_id: Option<u64>For Incremental and Differential snapshots, the id of the parent
snapshot this one is relative to. Always None for Full snapshots.
Implementations§
Source§impl LegacySnapshot
impl LegacySnapshot
Sourcepub fn total_size(&self) -> u64
pub fn total_size(&self) -> u64
Sum of size_bytes across all entries.
Sourcepub fn entry_count(&self) -> usize
pub fn entry_count(&self) -> usize
Number of block entries in this snapshot.
Trait Implementations§
Source§impl Clone for LegacySnapshot
impl Clone for LegacySnapshot
Source§fn clone(&self) -> LegacySnapshot
fn clone(&self) -> LegacySnapshot
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for LegacySnapshot
impl RefUnwindSafe for LegacySnapshot
impl Send for LegacySnapshot
impl Sync for LegacySnapshot
impl Unpin for LegacySnapshot
impl UnsafeUnpin for LegacySnapshot
impl UnwindSafe for LegacySnapshot
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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