Skip to main content

CheckpointStorage

Trait CheckpointStorage 

Source
pub trait CheckpointStorage: Send + Sync {
    // Required methods
    fn save(&self, checkpoint: &Checkpoint, name: &str) -> Result<()>;
    fn load(&self, name: &str) -> Result<Checkpoint>;
    fn list(&self) -> Result<Vec<String>>;
    fn delete(&self, name: &str) -> Result<()>;
    fn exists(&self, name: &str) -> bool;
}
Expand description

Trait for checkpoint storage backends.

Required Methods§

Source

fn save(&self, checkpoint: &Checkpoint, name: &str) -> Result<()>

Save a checkpoint with the given name.

Source

fn load(&self, name: &str) -> Result<Checkpoint>

Load a checkpoint by name.

Source

fn list(&self) -> Result<Vec<String>>

List all available checkpoints.

Source

fn delete(&self, name: &str) -> Result<()>

Delete a checkpoint.

Source

fn exists(&self, name: &str) -> bool

Check if a checkpoint exists.

Implementors§