pub trait SendDelay: Send {
// Required method
fn delay(&mut self, duration: Duration) -> impl Future<Output = ()> + Send;
}Expand description
Delay with a Send future, for procedures spawned on a multi-threaded executor.
The same method and contract, cancellation included, returning a future that is Send.
Every SendDelay is a Delay, through a blanket implementation; a type implements one of
the two. As with the other twins, bound generic code by SendDelay alone, and with both
traits in scope call SendDelay::delay(…) to avoid an ambiguous method call.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".