embassy-executor-timer-queue

Crates

git

Versions

default

Flavors

Skip to main content

item_from_waker

Function item_from_waker 

Source
pub unsafe fn item_from_waker(waker: &Waker) -> &'static mut TimerQueueItem
Expand description

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.