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 = Result<(), TaskError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
}
Available on crate feature tasks and non-WebAssembly only.
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 = Result<(), TaskError>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Executes the task and returns the result.

Implementors§