Lines Matching full:t
13 /// A handle for an `Arc<HasHrTimer<T>>` returned by a call to
15 pub struct ArcHrTimerHandle<T>
17 T: HasHrTimer<T>,
19 pub(crate) inner: Arc<T>,
24 unsafe impl<T> HrTimerHandle for ArcHrTimerHandle<T>
26 T: HasHrTimer<T>,
32 // must point to a valid `T`. in cancel()
33 let timer_ptr = unsafe { <T as HasHrTimer<T>>::raw_get_timer(self_ptr) }; in cancel()
35 // SAFETY: As `timer_ptr` points into `T` and `T` is valid, `timer_ptr` in cancel()
37 unsafe { HrTimer::<T>::raw_cancel(timer_ptr) } in cancel()
41 impl<T> Drop for ArcHrTimerHandle<T>
43 T: HasHrTimer<T>,
50 impl<T> HrTimerPointer for Arc<T>
52 T: 'static,
53 T: Send + Sync,
54 T: HasHrTimer<T>,
55 T: for<'a> HrTimerCallback<Pointer<'a> = Self>,
57 type TimerMode = <T as HasHrTimer<T>>::TimerMode;
58 type TimerHandle = ArcHrTimerHandle<T>;
62 expires: <<T as HasHrTimer<T>>::TimerMode as HrTimerMode>::Expires, in start()
63 ) -> ArcHrTimerHandle<T> { in start() argument
68 unsafe { T::start(Arc::as_ptr(&self), expires) }; in start()
73 impl<T> RawHrTimerCallback for Arc<T>
75 T: 'static,
76 T: HasHrTimer<T>,
77 T: for<'a> HrTimerCallback<Pointer<'a> = Self>,
79 type CallbackTarget<'a> = ArcBorrow<'a, T>;
83 let timer_ptr = ptr.cast::<super::HrTimer<T>>(); in run()
86 // queuing the timer, so it is a `HrTimer<T>` embedded in a `T`. in run()
87 let data_ptr = unsafe { T::timer_container_of(timer_ptr) }; in run()
90 // - `data_ptr` is derived form the pointer to the `T` that was used to in run()
94 // be alive until this method returns. That handle borrows the `T` in run()
102 T::run(receiver).into_c() in run()