Trait meio::task::OnTick [−][src]
pub trait OnTick: Actor { #[must_use] 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; #[must_use] 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; }
Handler of heartbeat events and a task
Required methods
#[must_use]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,
[src]
#[must_use]
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,
Called when tick received.
Also tick
will be called after lite task initialization.
#[must_use]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,
[src]
#[must_use]
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,
Called when the heartbeat task finished or interrupted.