#[repr(C)]pub struct SnapshotHeader {
pub magic: u32,
pub version: u32,
pub vm_id: u64,
pub vcpu_count: u32,
pub memory_pages: u64,
pub region_count: u32,
pub total_size: u64,
pub timestamp: u64,
pub checksum: u64,
}Expand description
Snapshot file header
Fields§
§magic: u32Magic number (SNAPSHOT_MAGIC)
version: u32Format version
vm_id: u64VM ID
vcpu_count: u32Number of vCPUs
memory_pages: u64Total memory pages
region_count: u32Number of regions in the snapshot
total_size: u64Total snapshot size in bytes
timestamp: u64Timestamp (kernel ticks at snapshot time)
checksum: u64Checksum (simple XOR-based)
Implementations§
Source§impl SnapshotHeader
impl SnapshotHeader
pub fn is_valid(&self) -> bool
Sourcepub fn compute_checksum(&self) -> u64
pub fn compute_checksum(&self) -> u64
Compute simple XOR checksum over header fields (excluding checksum itself)
Trait Implementations§
Source§impl Clone for SnapshotHeader
impl Clone for SnapshotHeader
Source§fn clone(&self) -> SnapshotHeader
fn clone(&self) -> SnapshotHeader
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SnapshotHeader
impl Debug for SnapshotHeader
Source§impl Default for SnapshotHeader
impl Default for SnapshotHeader
Source§impl PartialEq for SnapshotHeader
impl PartialEq for SnapshotHeader
impl Copy for SnapshotHeader
impl Eq for SnapshotHeader
impl StructuralPartialEq for SnapshotHeader
Auto Trait Implementations§
impl Freeze for SnapshotHeader
impl RefUnwindSafe for SnapshotHeader
impl Send for SnapshotHeader
impl Sync for SnapshotHeader
impl Unpin for SnapshotHeader
impl UnwindSafe for SnapshotHeader
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)