pub trait RunAsync<C = ()> {
type Output;
// Required method
fn run_async(self, context: C) -> impl Future<Output = Self::Output>;
}Expand description
A command that is awaited: Run, as a future.
An implementation writes async fn run_async(self, context: C). The
signature here is -> impl Future so that the trait implies no Send
bound either way: whether a command’s future is Send is decided by what
the command does.
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".