pub trait RawHrTimerCallback {
    type CallbackTarget<'a>;

    // Required method
    unsafe extern "C" fn run(this: *mut hrtimer) -> hrtimer_restart;
}
Expand description

Implemented by HrTimerPointer implementers to give the C timer callback a function to call.

Required Associated Types§

source

type CallbackTarget<'a>

Type of the parameter passed to HrTimerCallback::run. It may be Self, or a pointer type derived from Self.

Required Methods§

source

unsafe extern "C" fn run(this: *mut hrtimer) -> hrtimer_restart

Callback to be called from C when timer fires.

§Safety

Only to be called by C code in the hrtimer subsystem. this must point to the bindings::hrtimer structure that was used to start the timer.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<'a, T> RawHrTimerCallback for Pin<&'a T>
where T: HasHrTimer<T> + HrTimerCallback<Pointer<'a> = Self>,

§

type CallbackTarget<'b> = Pin<&'a T>

source§

unsafe extern "C" fn run(ptr: *mut hrtimer) -> hrtimer_restart

source§

impl<'a, T> RawHrTimerCallback for Pin<&'a mut T>
where T: HasHrTimer<T> + HrTimerCallback<Pointer<'a> = Self>,

§

type CallbackTarget<'b> = Pin<&'a mut T>

source§

unsafe extern "C" fn run(ptr: *mut hrtimer) -> hrtimer_restart

source§

impl<T, A> RawHrTimerCallback for Pin<Box<T, A>>
where T: 'static + HasHrTimer<T> + for<'a> HrTimerCallback<Pointer<'a> = Pin<Box<T, A>>>, A: Allocator,

§

type CallbackTarget<'a> = Pin<&'a mut T>

source§

unsafe extern "C" fn run(ptr: *mut hrtimer) -> hrtimer_restart

Implementors§

source§

impl<T> RawHrTimerCallback for Arc<T>
where T: 'static + HasHrTimer<T> + for<'a> HrTimerCallback<Pointer<'a> = Self>,

§

type CallbackTarget<'a> = ArcBorrow<'a, T>