pub trait Checkpointer: Send + Sync {
// Required methods
fn save<'life0, 'life1, 'async_trait>(
&'life0 self,
checkpoint: &'life1 Checkpoint,
) -> Pin<Box<dyn Future<Output = Result<String, GraphError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn load<'life0, 'life1, 'async_trait>(
&'life0 self,
thread_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Checkpoint>, GraphError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn load_by_id<'life0, 'life1, 'async_trait>(
&'life0 self,
checkpoint_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Checkpoint>, GraphError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn list<'life0, 'life1, 'async_trait>(
&'life0 self,
thread_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<Checkpoint>, GraphError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn delete<'life0, 'life1, 'async_trait>(
&'life0 self,
thread_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), GraphError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
}Available on crate feature
graph only.Expand description
Checkpointer trait for persistence
Required Methods§
Sourcefn save<'life0, 'life1, 'async_trait>(
&'life0 self,
checkpoint: &'life1 Checkpoint,
) -> Pin<Box<dyn Future<Output = Result<String, GraphError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn save<'life0, 'life1, 'async_trait>(
&'life0 self,
checkpoint: &'life1 Checkpoint,
) -> Pin<Box<dyn Future<Output = Result<String, GraphError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Save a checkpoint
Sourcefn load<'life0, 'life1, 'async_trait>(
&'life0 self,
thread_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Checkpoint>, GraphError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn load<'life0, 'life1, 'async_trait>(
&'life0 self,
thread_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Checkpoint>, GraphError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Load the latest checkpoint for a thread
Sourcefn load_by_id<'life0, 'life1, 'async_trait>(
&'life0 self,
checkpoint_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Checkpoint>, GraphError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn load_by_id<'life0, 'life1, 'async_trait>(
&'life0 self,
checkpoint_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Checkpoint>, GraphError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Load a specific checkpoint by ID