WorkflowTask

Trait WorkflowTask 

Source
pub trait WorkflowTask: Send + Sync {
    // Required method
    fn run<'life0, 'life1, 'async_trait>(
        &'life0 self,
        ctx: &'life1 mut WorkflowContext,
    ) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}

Required Methods§

Source

fn run<'life0, 'life1, 'async_trait>( &'life0 self, ctx: &'life1 mut WorkflowContext, ) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Implementors§

Source§

impl<F> WorkflowTask for FunctionTask<F>
where F: for<'a> Fn(&'a mut WorkflowContext) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'a>> + Send + Sync,

Source§

impl<M: LanguageModel> WorkflowTask for AgentTask<M>