pub trait HrTimerCallback {
type Pointer<'a>: RawHrTimerCallback;
// Required method
fn run(
this: <Self::Pointer<'_> as RawHrTimerCallback>::CallbackTarget<'_>,
ctx: HrTimerCallbackContext<'_, Self>,
) -> HrTimerRestart
where Self: Sized + HasHrTimer<Self>;
}Expand description
Implemented by structs that can be the target of a timer callback.
Required Associated Types§
Sourcetype Pointer<'a>: RawHrTimerCallback
type Pointer<'a>: RawHrTimerCallback
The type whose RawHrTimerCallback::run method will be invoked when
the timer expires.
Required Methods§
Sourcefn run(
this: <Self::Pointer<'_> as RawHrTimerCallback>::CallbackTarget<'_>,
ctx: HrTimerCallbackContext<'_, Self>,
) -> HrTimerRestartwhere
Self: Sized + HasHrTimer<Self>,
fn run(
this: <Self::Pointer<'_> as RawHrTimerCallback>::CallbackTarget<'_>,
ctx: HrTimerCallbackContext<'_, Self>,
) -> HrTimerRestartwhere
Self: Sized + HasHrTimer<Self>,
Called by the timer logic when the timer fires.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".