pub trait CheckpointSaver: Send + Sync {
// Required methods
fn put(&self, checkpoint: Checkpoint) -> Result<(), CheckpointError>;
fn get(
&self,
thread_id: &str,
checkpoint_id: &str,
) -> Result<Option<Checkpoint>, CheckpointError>;
fn list(&self, thread_id: &str) -> Result<Vec<Checkpoint>, CheckpointError>;
}Required Methods§
fn put(&self, checkpoint: Checkpoint) -> Result<(), CheckpointError>
fn get( &self, thread_id: &str, checkpoint_id: &str, ) -> Result<Option<Checkpoint>, CheckpointError>
Sourcefn list(&self, thread_id: &str) -> Result<Vec<Checkpoint>, CheckpointError>
fn list(&self, thread_id: &str) -> Result<Vec<Checkpoint>, CheckpointError>
Returns checkpoints for a thread.
Order is backend-defined and MUST NOT be relied on by callers.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".