pub trait CheckpointStorage: Send + Sync {
// Required methods
fn save<'life0, 'async_trait>(
&'life0 self,
checkpoint: WorkflowCheckpoint,
) -> Pin<Box<dyn Future<Output = Result<String, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn load<'life0, 'life1, 'async_trait>(
&'life0 self,
checkpoint_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<WorkflowCheckpoint>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn list<'life0, 'life1, 'async_trait>(
&'life0 self,
workflow_id: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<Vec<WorkflowCheckpoint>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn delete<'life0, 'life1, 'async_trait>(
&'life0 self,
checkpoint_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
}Expand description
Storage backend for workflow checkpoints.
Rust analogue of Python’s CheckpointStorage protocol.
Required Methods§
Sourcefn save<'life0, 'async_trait>(
&'life0 self,
checkpoint: WorkflowCheckpoint,
) -> Pin<Box<dyn Future<Output = Result<String, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn save<'life0, 'async_trait>(
&'life0 self,
checkpoint: WorkflowCheckpoint,
) -> Pin<Box<dyn Future<Output = Result<String, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Persist a checkpoint, returning its id.
Sourcefn load<'life0, 'life1, 'async_trait>(
&'life0 self,
checkpoint_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<WorkflowCheckpoint>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn load<'life0, 'life1, 'async_trait>(
&'life0 self,
checkpoint_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<WorkflowCheckpoint>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Load a checkpoint by id, or None if it does not exist.
Sourcefn list<'life0, 'life1, 'async_trait>(
&'life0 self,
workflow_id: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<Vec<WorkflowCheckpoint>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn list<'life0, 'life1, 'async_trait>(
&'life0 self,
workflow_id: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<Vec<WorkflowCheckpoint>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
List checkpoints, optionally filtered by workflow id.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".