Trait netstack3_base::CoreTimerContext
source · pub trait CoreTimerContext<T, BT: TimerBindingsTypes> {
// Required method
fn convert_timer(dispatch_id: T) -> BT::DispatchId;
// Provided method
fn new_timer(bindings_ctx: &mut BT, dispatch_id: T) -> BT::Timer
where BT: TimerContext { ... }
}
Expand description
A core context providing timer type conversion.
This trait is used to convert from a core-internal timer type T
to the
timer dispatch ID supported by bindings in BT::DispatchId
.
Required Methods§
sourcefn convert_timer(dispatch_id: T) -> BT::DispatchId
fn convert_timer(dispatch_id: T) -> BT::DispatchId
Converts an inner timer to the bindings timer type.
Provided Methods§
sourcefn new_timer(bindings_ctx: &mut BT, dispatch_id: T) -> BT::Timerwhere
BT: TimerContext,
fn new_timer(bindings_ctx: &mut BT, dispatch_id: T) -> BT::Timerwhere
BT: TimerContext,
A helper function to create a new timer with the provided dispatch id.
Object Safety§
This trait is not object safe.