CheckpointableKernel

Trait CheckpointableKernel 

Source
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§

Source

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.

Source

fn restore_from_checkpoint(&mut self, checkpoint: &Checkpoint) -> Result<()>

Restore kernel state from a checkpoint.

This should pause the kernel, deserialize state, and resume.

Source

fn checkpoint_kernel_id(&self) -> &str

Get the kernel ID for checkpointing.

Source

fn checkpoint_kernel_type(&self) -> &str

Get the kernel type for checkpointing.

Provided Methods§

Source

fn supports_incremental(&self) -> bool

Check if the kernel supports incremental checkpoints.

Source

fn create_incremental_checkpoint( &self, _base: &Checkpoint, ) -> Result<Checkpoint>

Create an incremental checkpoint (only changed state since last checkpoint).

Implementors§