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§

source

fn convert_timer(dispatch_id: T) -> BT::DispatchId

Converts an inner timer to the bindings timer type.

Provided Methods§

source

fn new_timer(bindings_ctx: &mut BT, dispatch_id: T) -> BT::Timer
where BT: TimerContext,

A helper function to create a new timer with the provided dispatch id.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<CC, N, T, BT> CoreTimerContext<T, BT> for NestedIntoCoreTimerCtx<CC, N>
where BT: TimerBindingsTypes, CC: CoreTimerContext<N, BT>, T: Into<N>,

source§

impl<T, BT> CoreTimerContext<T, BT> for IntoCoreTimerCtx
where BT: TimerBindingsTypes, T: Into<BT::DispatchId>,