Skip to main content

RunnerAsync

Trait RunnerAsync 

Source
pub trait RunnerAsync: ExecutableAsync {
    // Required method
    fn run(
        &mut self,
        state: &mut Self::UserState,
    ) -> impl Future<Output = Result<(), RunnerError>> + Send;

    // Provided methods
    fn before_global(
        &mut self,
        _state: &mut Self::UserState,
    ) -> impl Future<Output = Result<(), RunnerError>> + Send { ... }
    fn before(
        &mut self,
        _state: &mut Self::UserState,
    ) -> impl Future<Output = Result<(), RunnerError>> + Send { ... }
    fn after(
        &self,
        _state: &Self::UserState,
    ) -> impl Future<Output = Result<(), RunnerError>> + Send { ... }
    fn after_global(
        &self,
        _state: &Self::UserState,
    ) -> impl Future<Output = Result<(), RunnerError>> + Send { ... }
}

Required Methods§

Source

fn run( &mut self, state: &mut Self::UserState, ) -> impl Future<Output = Result<(), RunnerError>> + Send

Provided Methods§

Source

fn before_global( &mut self, _state: &mut Self::UserState, ) -> impl Future<Output = Result<(), RunnerError>> + Send

Source

fn before( &mut self, _state: &mut Self::UserState, ) -> impl Future<Output = Result<(), RunnerError>> + Send

Source

fn after( &self, _state: &Self::UserState, ) -> impl Future<Output = Result<(), RunnerError>> + Send

Source

fn after_global( &self, _state: &Self::UserState, ) -> impl Future<Output = Result<(), RunnerError>> + Send

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§