embassy-executor-timer-queue

Crates

git

Versions

default

Flavors

Skip to main content

TimerQueueItemProviderImpl

Struct TimerQueueItemProviderImpl 

Source
pub struct TimerQueueItemProviderImpl;
Expand description

The global TimerQueueItemProvider implementation.

Implementations§

Source§

impl TimerQueueItemProviderImpl

Source

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.

Source

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

Source§

unsafe fn item_from_waker(waker: &Waker) -> &'static mut TimerQueueItem

Retrieves the TimerQueueItem reference that belongs to the task of the waker. Read more
Source§

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 more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.