pub trait RunAsync {
type Output;
// Required method
fn run_async(self) -> impl Future<Output = Self::Output>;
}Expand description
An async command: Run, awaited.
The signature is -> impl Future rather than async fn so that no Send bound is implied
either way — an implementation still writes async fn run_async(self), and whether its
future is Send is decided by what the command does rather than by this trait. See the
module docs.
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".