Skip to main content

SnapshotDescription

Struct SnapshotDescription 

Source
pub struct SnapshotDescription {
Show 13 fields pub state_path: PathBuf, pub magic: u64, pub version: Version, pub expected_version: Version, pub vcpu_count: usize, pub mem_size_mib: u64, pub track_dirty_pages: bool, pub devices: Vec<(String, String, u32)>, pub mmds_present: bool, pub inferred_memory_path: Option<PathBuf>, pub inferred_memory_exists: bool, pub inferred_memory_size: Option<u64>, pub crc_ok: bool,
}
Expand description

What --describe-snapshot prints. Captures the same fields a Firecracker user would expect:

  • file path
  • magic + version
  • vCPU count
  • mem_size_mib
  • dirty-page tracking flag
  • whether the matching memory file looks present

Fields§

§state_path: PathBuf

Path to the state file.

§magic: u64

Magic value embedded in the file.

§version: Version

Version embedded in the file.

§expected_version: Version

Squib’s expected version (for the cross-version note).

§vcpu_count: usize

Number of vCPUs the snapshot saved.

§mem_size_mib: u64

Configured guest RAM size in MiB.

§track_dirty_pages: bool

Whether dirty-page tracking was enabled at save time.

§devices: Vec<(String, String, u32)>

Per-device summary: (class, id, mmio_slot).

§mmds_present: bool

Whether MMDS state is present.

§inferred_memory_path: Option<PathBuf>

Best-effort memory-file path inferred by swapping .snap.mem.

§inferred_memory_exists: bool

Whether that inferred memory file exists.

§inferred_memory_size: Option<u64>

Inferred memory file’s size in bytes (if present).

§crc_ok: bool

CRC verified on load.

Implementations§

Source§

impl SnapshotDescription

Source

pub fn to_json(&self) -> Value

Convert to a serde_json::Value for machine consumption.

Source

pub fn human(&self) -> String

Format a human-readable summary suitable for --describe-snapshot stdout.

Trait Implementations§

Source§

impl Clone for SnapshotDescription

Source§

fn clone(&self) -> SnapshotDescription

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SnapshotDescription

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more