pub trait TimerHandler<BC: TimerBindingsTypes, Id> {
// Required method
fn handle_timer(
&mut self,
bindings_ctx: &mut BC,
dispatch: Id,
timer: BC::UniqueTimerId,
);
}Expand description
A handler for timer firing events.
A TimerHandler is a type capable of handling the event of a timer firing.
TimerHandler is offered as a blanket implementation for all timers that
implement HandleableTimer. TimerHandler is meant to be used as bounds
on core context types. whereas HandleableTimer allows split-crate
implementations sidestepping coherence issues.
Required Methods§
Sourcefn handle_timer(
&mut self,
bindings_ctx: &mut BC,
dispatch: Id,
timer: BC::UniqueTimerId,
)
fn handle_timer( &mut self, bindings_ctx: &mut BC, dispatch: Id, timer: BC::UniqueTimerId, )
Handle a timer firing.
dispatch is the firing timer’s dispatch identifier, i.e., a
HandleableTimer.
timer is the unique timer identifier for the
TimerBindingsTypes::Timer that scheduled this operation.