Struct rotor_tools::timer::Ticker
[−]
[src]
pub struct Ticker<M: Timer> { // some fields omitted }
Ticker state machine
The structure implements rotor::Machine
but exposes a simpler protocol
that has just one method which is called when timer expires.
The Ticker
machine also ensures that there are no spurious events.
Methods
impl<T: Timer> Ticker<T>
[src]
Trait Implementations
impl<M: Timer> Machine for Ticker<M>
[src]
type Context = M::Context
Context type for the state machine Read more
type Seed = Void
Seed is piece of data that is needed to initialize the machine Read more
fn create(seed: Self::Seed, _scope: &mut Scope<Self::Context>) -> Response<Self, Void>
Create a machine from some data Read more
fn ready(self, _events: EventSet, _scope: &mut Scope<Self::Context>) -> Response<Self, Self::Seed>
Socket readiness notification
fn spawned(self, _scope: &mut Scope<Self::Context>) -> Response<Self, Self::Seed>
Called after spawn event Read more
fn timeout(self, scope: &mut Scope<Self::Context>) -> Response<Self, Self::Seed>
Timeout happened
fn wakeup(self, _scope: &mut Scope<Self::Context>) -> Response<Self, Self::Seed>
Message received Read more
fn spawn_error(self, _scope: &mut Scope<Self::Context>, error: SpawnError<Self::Seed>) -> Response<Self, Self::Seed>
Called instead of spawned, if there is no slab space Read more