write_snapshot

Function write_snapshot 

Source
pub fn write_snapshot(
    dir: &Path,
    manifest: &SnapshotManifest,
    saved_state_bytes: &[u8],
    memory_file_path: &Path,
) -> Result<()>
Expand description

Write a snapshot to the given directory.

The directory is created if it does not exist. The snapshot consists of:

  • manifest.bin — protobuf-encoded SnapshotManifest
  • state.bin — raw device saved-state bytes
  • memory.bin — hard link to the memory backing file