pub trait Checkpointer: Send + Sync {
// Required methods
fn put<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
config: &'life1 CheckpointConfig,
checkpoint: &'life2 Checkpoint,
) -> Pin<Box<dyn Future<Output = Result<(), SynapticError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
config: &'life1 CheckpointConfig,
) -> Pin<Box<dyn Future<Output = Result<Option<Checkpoint>, SynapticError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn list<'life0, 'life1, 'async_trait>(
&'life0 self,
config: &'life1 CheckpointConfig,
) -> Pin<Box<dyn Future<Output = Result<Vec<Checkpoint>, SynapticError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Trait for persisting graph state checkpoints.
Required Methods§
Sourcefn put<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
config: &'life1 CheckpointConfig,
checkpoint: &'life2 Checkpoint,
) -> Pin<Box<dyn Future<Output = Result<(), SynapticError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn put<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
config: &'life1 CheckpointConfig,
checkpoint: &'life2 Checkpoint,
) -> Pin<Box<dyn Future<Output = Result<(), SynapticError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Save a checkpoint for the given thread.
Sourcefn get<'life0, 'life1, 'async_trait>(
&'life0 self,
config: &'life1 CheckpointConfig,
) -> Pin<Box<dyn Future<Output = Result<Option<Checkpoint>, SynapticError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
config: &'life1 CheckpointConfig,
) -> Pin<Box<dyn Future<Output = Result<Option<Checkpoint>, SynapticError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get a checkpoint. If config.checkpoint_id is set, returns that specific
checkpoint; otherwise returns the latest checkpoint for the thread.
Sourcefn list<'life0, 'life1, 'async_trait>(
&'life0 self,
config: &'life1 CheckpointConfig,
) -> Pin<Box<dyn Future<Output = Result<Vec<Checkpoint>, SynapticError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn list<'life0, 'life1, 'async_trait>(
&'life0 self,
config: &'life1 CheckpointConfig,
) -> Pin<Box<dyn Future<Output = Result<Vec<Checkpoint>, SynapticError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
List all checkpoints for a thread, ordered oldest to newest.