pub trait Task {
type Ok;
type Error;
type Future: Future<Output = Result<Self::Ok, Self::Error>>;
// Required method
fn run(&mut self) -> Self::Future;
}
Expand description
A task produces an asynchronous computation that can be retried if the returned future fails with some error.