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§
Sourcetype Error: EngineTaskError
type Error: EngineTaskError
The error type of the task.
Required Methods§
Sourcefn 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,
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.