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§
Sourcefn task_completed(&mut self)
fn task_completed(&mut self)
Called when the task has completed.
Sourcefn task_poll_start(&mut self)
fn task_poll_start(&mut self)
Called when the task is about to be polled.
Sourcefn task_poll_end(&mut self)
fn task_poll_end(&mut self)
Called when the task has finished being polled.