embassy-executor

Crates

0.2.1

Versions

wasm

Flavors

Struct Pender

Source
pub struct Pender(/* private fields */);
Expand description

Platform/architecture-specific action executed when an executor has pending work.

When a task within an executor is woken, the Pender is called. This does a platform/architecture-specific action to signal there is pending work in the executor. When this happens, you must arrange for Executor::poll to be called.

You can think of it as a waker, but for the whole executor.

Implementations§

Source§

impl Pender

Source

pub fn new_from_callback(func: fn(*mut ()), context: *mut ()) -> Self

Create a Pender that will call an arbitrary function pointer.

§Arguments
  • func: The function pointer to call.
  • context: Opaque context pointer, that will be passed to the function pointer.

Auto Trait Implementations§

§

impl Freeze for Pender

§

impl !RefUnwindSafe for Pender

§

impl Send for Pender

§

impl Sync for Pender

§

impl Unpin for Pender

§

impl !UnwindSafe for Pender

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 = Infallible

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.