Skip to main content

TaskExecutor

Trait TaskExecutor 

Source
pub trait TaskExecutor: Task {
    // Required method
    fn execute<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = TaskResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Trait for tasks that can be executed asynchronously.

Required Methods§

Source

fn execute<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = TaskResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Executes the task and returns the result.

Implementors§