Skip to main content

Checkpointer

Trait Checkpointer 

Source
pub trait Checkpointer:
    Send
    + Sync
    + 'static {
    // Required methods
    fn save<'life0, 'async_trait>(
        &'life0 self,
        snapshot: Snapshot,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn load<'life0, 'life1, 'async_trait>(
        &'life0 self,
        key: &'life1 CheckpointKey,
    ) -> Pin<Box<dyn Future<Output = Result<Option<Snapshot>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn latest<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        workflow_id: &'life1 WorkflowId,
        run_id: &'life2 RunId,
    ) -> Pin<Box<dyn Future<Output = Result<Option<Snapshot>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn list<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        workflow_id: &'life1 WorkflowId,
        run_id: &'life2 RunId,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<CheckpointMeta>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn fork<'life0, 'life1, 'async_trait>(
        &'life0 self,
        from: &'life1 CheckpointKey,
        edits: Vec<(String, Value)>,
    ) -> Pin<Box<dyn Future<Output = Result<RunId>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}

Required Methods§

Source

fn save<'life0, 'async_trait>( &'life0 self, snapshot: Snapshot, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn load<'life0, 'life1, 'async_trait>( &'life0 self, key: &'life1 CheckpointKey, ) -> Pin<Box<dyn Future<Output = Result<Option<Snapshot>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn latest<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, workflow_id: &'life1 WorkflowId, run_id: &'life2 RunId, ) -> Pin<Box<dyn Future<Output = Result<Option<Snapshot>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Returns the latest snapshot for a (workflow, run) pair.

Source

fn list<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, workflow_id: &'life1 WorkflowId, run_id: &'life2 RunId, ) -> Pin<Box<dyn Future<Output = Result<Vec<CheckpointMeta>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source

fn fork<'life0, 'life1, 'async_trait>( &'life0 self, from: &'life1 CheckpointKey, edits: Vec<(String, Value)>, ) -> Pin<Box<dyn Future<Output = Result<RunId>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Create a new run that diverges from an existing checkpoint with an optional set of state edits applied at the fork point.

Implementors§