Skip to main content

Callbacks

Trait Callbacks 

Source
pub trait Callbacks {
    // Required methods
    fn before_poll(&mut self);
    fn on_idle(&mut self);
}
Available on crate feature embassy only.
Expand description

Callbacks to run code before/after polling the task queue.

Required Methods§

Source

fn before_poll(&mut self)

Called just before polling the executor.

Source

fn on_idle(&mut self)

Called after the executor is polled, if there is no work scheduled.

Note that tasks can become ready at any point during the execution of this function.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§