pub trait Task {
// Required method
fn poll(&mut self) -> Poll;
}Expand description
A unit of schedulable work (e.g. one DB connection’s driver).
Required Methods§
Sourcefn poll(&mut self) -> Poll
fn poll(&mut self) -> Poll
Advances the task. Returning Poll::Ready removes it from the
scheduler.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".