Trait Callbacks

Source
pub trait Callbacks {
    // Required methods
    fn before_poll(&mut self);
    fn on_idle(&mut self);
}
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.

Implementors§