Module snapshot

Module snapshot 

Source
Expand description

Serialization and deserialization facilities Provides serialization and deserialization facilities and implements a persistent storage format for Firecracker state snapshots.

The Snapshot API manages serialization and deserialization of collections of objects that implement the serde Serialize, Deserialize trait. Currently, we use bincode for performing the serialization.

The snapshot format uses the following layout:

|—————————–|

64 bit magic_id
version string
—————————–
State
—————————–
optional CRC64
—————————–

The snapshot format uses a version value in the form of MAJOR.MINOR.PATCH. The version is provided by the library clients (it is not tied to this crate).

Modules§

crc
Implements readers and writers that compute the CRC64 checksum of the bytes read/written.

Structs§

Snapshot
Firecracker snapshot type

Enums§

SnapshotError
Error definitions for the Snapshot API.

Traits§

Persist
An abstract interface for saving/restoring a component using a specific state.

Functions§

get_format_version
Assumes the raw bytes stream read from the given Read instance is a snapshot file, and returns the version of it.