Skip to main content

CoreTimerContext

Trait 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§

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.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

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, C> CoreTimerContext<T, BT> for UninstantiableWrapper<C>
where BT: TimerBindingsTypes, C: CoreTimerContext<T, BT>,

Source§

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