pub struct KernelSnapshot { /* private fields */ }Expand description
Opaque point-in-time snapshot of kernel state.
Pub struct, pub(crate) fields — external callers see the type at the
API boundary and can hold a value, but cannot inspect its internals
(use serialize / deserialize
for round-trip persistence). Fed to
Kernel::from_snapshot for restore.
Implementations§
Source§impl KernelSnapshot
impl KernelSnapshot
Sourcepub fn deserialize(bytes: &[u8]) -> Result<Self, SnapshotError>
pub fn deserialize(bytes: &[u8]) -> Result<Self, SnapshotError>
Decode from canonical postcard bytes.
Sourcepub fn instance_count(&self) -> usize
pub fn instance_count(&self) -> usize
Number of instances captured.
Sourcepub fn instance_ids(&self) -> impl Iterator<Item = InstanceId> + '_
pub fn instance_ids(&self) -> impl Iterator<Item = InstanceId> + '_
Iterate captured instance ids in canonical (InstanceId ascending) order.
Trait Implementations§
Source§impl Clone for KernelSnapshot
impl Clone for KernelSnapshot
Source§fn clone(&self) -> KernelSnapshot
fn clone(&self) -> KernelSnapshot
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for KernelSnapshot
impl Debug for KernelSnapshot
Source§impl<'de> Deserialize<'de> for KernelSnapshot
impl<'de> Deserialize<'de> for KernelSnapshot
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for KernelSnapshot
impl RefUnwindSafe for KernelSnapshot
impl Send for KernelSnapshot
impl Sync for KernelSnapshot
impl Unpin for KernelSnapshot
impl UnsafeUnpin for KernelSnapshot
impl UnwindSafe for KernelSnapshot
Blanket Implementations§
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