pub trait CheckpointableKernel {
// Required methods
fn create_checkpoint(&self) -> Result<Checkpoint>;
fn restore_from_checkpoint(&mut self, checkpoint: &Checkpoint) -> Result<()>;
fn checkpoint_kernel_id(&self) -> &str;
fn checkpoint_kernel_type(&self) -> &str;
// Provided methods
fn supports_incremental(&self) -> bool { ... }
fn create_incremental_checkpoint(
&self,
_base: &Checkpoint,
) -> Result<Checkpoint> { ... }
}Expand description
Trait for kernels that support checkpointing.
Required Methods§
Sourcefn create_checkpoint(&self) -> Result<Checkpoint>
fn create_checkpoint(&self) -> Result<Checkpoint>
Create a checkpoint of the current kernel state.
This should pause the kernel, serialize all state, and return a checkpoint.
Sourcefn restore_from_checkpoint(&mut self, checkpoint: &Checkpoint) -> Result<()>
fn restore_from_checkpoint(&mut self, checkpoint: &Checkpoint) -> Result<()>
Restore kernel state from a checkpoint.
This should pause the kernel, deserialize state, and resume.
Sourcefn checkpoint_kernel_id(&self) -> &str
fn checkpoint_kernel_id(&self) -> &str
Get the kernel ID for checkpointing.
Sourcefn checkpoint_kernel_type(&self) -> &str
fn checkpoint_kernel_type(&self) -> &str
Get the kernel type for checkpointing.
Provided Methods§
Sourcefn supports_incremental(&self) -> bool
fn supports_incremental(&self) -> bool
Check if the kernel supports incremental checkpoints.
Sourcefn create_incremental_checkpoint(
&self,
_base: &Checkpoint,
) -> Result<Checkpoint>
fn create_incremental_checkpoint( &self, _base: &Checkpoint, ) -> Result<Checkpoint>
Create an incremental checkpoint (only changed state since last checkpoint).