Trait meio::tasks::heartbeat::OnTick[][src]

pub trait OnTick: Actor {
    fn tick<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        tick: Tick,
        ctx: &'life1 mut Context<Self>
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
fn done<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        ctx: &'life1 mut Context<Self>
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
; }
Expand description

Handler of heartbeat events and a task

Required methods

Called when tick received.

Also tick will be called after lite task initialization.

Called when the heartbeat task finished or interrupted.

Implementors