pub trait CheckpointStore<C: Context, WI: WorkItem> {
// Required methods
fn save<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
workflow_id: &'life1 str,
checkpoint: &'life2 Checkpoint<C, WI>,
) -> Pin<Box<dyn Future<Output = Result<(), CheckpointError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn load<'life0, 'life1, 'async_trait>(
&'life0 self,
workflow_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Checkpoint<C, WI>>, CheckpointError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
A trait for persisting and loading workflow checkpoints.
Required Methods§
Sourcefn save<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
workflow_id: &'life1 str,
checkpoint: &'life2 Checkpoint<C, WI>,
) -> Pin<Box<dyn Future<Output = Result<(), CheckpointError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn save<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
workflow_id: &'life1 str,
checkpoint: &'life2 Checkpoint<C, WI>,
) -> Pin<Box<dyn Future<Output = Result<(), CheckpointError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Persist the given checkpoint under workflow_id.
Sourcefn load<'life0, 'life1, 'async_trait>(
&'life0 self,
workflow_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Checkpoint<C, WI>>, CheckpointError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load<'life0, 'life1, 'async_trait>(
&'life0 self,
workflow_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Checkpoint<C, WI>>, CheckpointError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Load the last-saved checkpoint for workflow_id, if any.