pub trait CheckpointStore: Send + Sync {
// Required methods
fn save_checkpoint(
&self,
checkpoint: Checkpoint,
) -> CheckpointFuture<'_, ()>;
fn load_checkpoint(
&self,
id: &str,
) -> CheckpointFuture<'_, Option<Checkpoint>>;
fn list_checkpoints(&self) -> CheckpointFuture<'_, Vec<String>>;
fn delete_checkpoint(&self, id: &str) -> CheckpointFuture<'_, ()>;
}Expand description
Async trait for persisting and loading agent checkpoints.
Implementations can back onto any storage: filesystem, database, cloud, etc.
Required Methods§
Sourcefn save_checkpoint(&self, checkpoint: Checkpoint) -> CheckpointFuture<'_, ()>
fn save_checkpoint(&self, checkpoint: Checkpoint) -> CheckpointFuture<'_, ()>
Save a checkpoint. Overwrites any existing checkpoint with the same ID.
Sourcefn load_checkpoint(&self, id: &str) -> CheckpointFuture<'_, Option<Checkpoint>>
fn load_checkpoint(&self, id: &str) -> CheckpointFuture<'_, Option<Checkpoint>>
Load a checkpoint by ID.
Sourcefn list_checkpoints(&self) -> CheckpointFuture<'_, Vec<String>>
fn list_checkpoints(&self) -> CheckpointFuture<'_, Vec<String>>
List all checkpoint IDs, most recent first.
Sourcefn delete_checkpoint(&self, id: &str) -> CheckpointFuture<'_, ()>
fn delete_checkpoint(&self, id: &str) -> CheckpointFuture<'_, ()>
Delete a checkpoint by ID.