pub struct TimerQueueItemProviderImpl;Expand description
The global TimerQueueItemProvider implementation.
Implementations§
Source§impl TimerQueueItemProviderImpl
impl TimerQueueItemProviderImpl
Sourcepub unsafe fn item_from_waker(waker: &Waker) -> &'static mut TimerQueueItem
pub unsafe fn item_from_waker(waker: &Waker) -> &'static mut TimerQueueItem
Retrieves the TimerQueueItem reference that belongs to the task of the waker.
Panics if called with a non-embassy waker.
§Safety
The caller must ensure they are not violating Rust’s aliasing rules - it is not allowed
to use this method to create multiple mutable references to the same TimerQueueItem at
the same time.
This function must only be called in the context of a timer queue implementation.
Sourcepub unsafe fn try_item_from_waker(
waker: &Waker,
) -> Option<&'static mut TimerQueueItem>
pub unsafe fn try_item_from_waker( waker: &Waker, ) -> Option<&'static mut TimerQueueItem>
Like item_from_waker, but returns None
instead of panicking if the waker is not an embassy waker.
§Safety
Same as item_from_waker.
Trait Implementations§
Source§impl TimerQueueItemProvider for TimerQueueItemProviderImpl
impl TimerQueueItemProvider for TimerQueueItemProviderImpl
Source§unsafe fn item_from_waker(waker: &Waker) -> &'static mut TimerQueueItem
unsafe fn item_from_waker(waker: &Waker) -> &'static mut TimerQueueItem
Retrieves the
TimerQueueItem reference that belongs to the task of the waker. Read moreSource§unsafe fn try_item_from_waker(
waker: &Waker,
) -> Option<&'static mut TimerQueueItem>
unsafe fn try_item_from_waker( waker: &Waker, ) -> Option<&'static mut TimerQueueItem>
Like
item_from_waker, but returns None
instead of panicking if the waker is not an embassy waker. Read moreAuto Trait Implementations§
impl Freeze for TimerQueueItemProviderImpl
impl RefUnwindSafe for TimerQueueItemProviderImpl
impl Send for TimerQueueItemProviderImpl
impl Sync for TimerQueueItemProviderImpl
impl Unpin for TimerQueueItemProviderImpl
impl UnsafeUnpin for TimerQueueItemProviderImpl
impl UnwindSafe for TimerQueueItemProviderImpl
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more