Trait Hooks

Source
pub trait Hooks {
    // Required methods
    fn task_completed(&mut self);
    fn task_poll_start(&mut self);
    fn task_poll_end(&mut self);
}
Expand description

A trait for instrumenting futures.

This trait provides a way to receive callbacks for various events that occur for a future, such as completion, and polling.

Required Methods§

Source

fn task_completed(&mut self)

Called when the task has completed.

Source

fn task_poll_start(&mut self)

Called when the task is about to be polled.

Source

fn task_poll_end(&mut self)

Called when the task has finished being polled.

Implementors§