Trait RawHrTimerCallback

Source
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.

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.

Implementations on Foreign Types§

Source§

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

Source§

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>,

Source§

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,

Source§

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>,