Skip to main content

TaskExecutor

Trait TaskExecutor 

Source
pub trait TaskExecutor: Send + Sync {
    // Required method
    fn execute<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        task: &'life1 TaskNode,
        context: &'life2 ExecutionContext,
    ) -> Pin<Box<dyn Future<Output = Result<TaskOutput>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
}
Expand description

Task executor trait - implement this to define custom task execution logic.

Required Methods§

Source

fn execute<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, task: &'life1 TaskNode, context: &'life2 ExecutionContext, ) -> Pin<Box<dyn Future<Output = Result<TaskOutput>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Execute a task.

Implementors§