Skip to main content

WorkflowDatabase

Trait WorkflowDatabase 

Source
pub trait WorkflowDatabase: Send + Sync {
    // Required methods
    fn create_workflow<'life0, 'life1, 'async_trait>(
        &'life0 self,
        workflow: &'life1 WorkflowState,
    ) -> Pin<Box<dyn Future<Output = WorkflowResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_workflow<'life0, 'life1, 'async_trait>(
        &'life0 self,
        workflow_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = WorkflowResult<WorkflowState>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn update_workflow<'life0, 'life1, 'async_trait>(
        &'life0 self,
        workflow: &'life1 WorkflowState,
    ) -> Pin<Box<dyn Future<Output = WorkflowResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn create_task<'life0, 'life1, 'async_trait>(
        &'life0 self,
        task: &'life1 TaskState,
    ) -> Pin<Box<dyn Future<Output = WorkflowResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_task<'life0, 'life1, 'async_trait>(
        &'life0 self,
        task_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = WorkflowResult<TaskState>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn update_task<'life0, 'life1, 'async_trait>(
        &'life0 self,
        task: &'life1 TaskState,
    ) -> Pin<Box<dyn Future<Output = WorkflowResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_tasks_by_workflow<'life0, 'life1, 'async_trait>(
        &'life0 self,
        workflow_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = WorkflowResult<Vec<TaskState>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Database backend trait

Required Methods§

Source

fn create_workflow<'life0, 'life1, 'async_trait>( &'life0 self, workflow: &'life1 WorkflowState, ) -> Pin<Box<dyn Future<Output = WorkflowResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn get_workflow<'life0, 'life1, 'async_trait>( &'life0 self, workflow_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = WorkflowResult<WorkflowState>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn update_workflow<'life0, 'life1, 'async_trait>( &'life0 self, workflow: &'life1 WorkflowState, ) -> Pin<Box<dyn Future<Output = WorkflowResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn create_task<'life0, 'life1, 'async_trait>( &'life0 self, task: &'life1 TaskState, ) -> Pin<Box<dyn Future<Output = WorkflowResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn get_task<'life0, 'life1, 'async_trait>( &'life0 self, task_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = WorkflowResult<TaskState>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn update_task<'life0, 'life1, 'async_trait>( &'life0 self, task: &'life1 TaskState, ) -> Pin<Box<dyn Future<Output = WorkflowResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn get_tasks_by_workflow<'life0, 'life1, 'async_trait>( &'life0 self, workflow_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = WorkflowResult<Vec<TaskState>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Implementors§