Trait EngineTaskExt

Source
pub trait EngineTaskExt {
    type Output;
    type Error: EngineTaskError;

    // Required method
    fn execute<'life0, 'life1, 'async_trait>(
        &'life0 self,
        state: &'life1 mut EngineState,
    ) -> Pin<Box<dyn Future<Output = Result<Self::Output, Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

The interface for an engine task.

Required Associated Types§

Source

type Output

The output type of the task.

Source

type Error: EngineTaskError

The error type of the task.

Required Methods§

Source

fn execute<'life0, 'life1, 'async_trait>( &'life0 self, state: &'life1 mut EngineState, ) -> Pin<Box<dyn Future<Output = Result<Self::Output, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Executes the task, taking a shared lock on the engine state and self.

Implementors§