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.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.