Trait Task

Source
pub trait Task<E: TError>: Send + 'static {
    // Provided methods
    fn on_start<'life0, 'async_trait>(
        &'life0 mut self,
        ctx: Context<E>,
    ) -> Pin<Box<dyn Future<Output = Result<(), E>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
    fn on_stop<'life0, 'async_trait>(
        &'life0 mut self,
        ctx: Context<E>,
    ) -> Pin<Box<dyn Future<Output = Result<(), E>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
}

Provided Methods§

Source

fn on_start<'life0, 'async_trait>( &'life0 mut self, ctx: Context<E>, ) -> Pin<Box<dyn Future<Output = Result<(), E>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn on_stop<'life0, 'async_trait>( &'life0 mut self, ctx: Context<E>, ) -> Pin<Box<dyn Future<Output = Result<(), E>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§