[−][src]Trait act_zero::timer::Tick
Provides an actor with a "tick" method, that will be called whenever a timer elapses.
Note: spurious tick events may be received: the expectation is that
actors respond to this event by checking if any timers have elapsed.
The Timer
struct has a tick()
method for this purpose.
This trait is defined using the #[async_trait]
attribute as follows:
ⓘ
#[async_trait] pub trait Tick: Actor { /// Called whenever a timer might have elapsed. async fn tick(&mut self) -> ActorResult<()>; }
Required methods
#[must_use]pub fn tick<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = ActorResult<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self
) -> Pin<Box<dyn Future<Output = ActorResult<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Called whenever a timer might have elapsed.