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.
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".