pub trait Executor {
type JoinHandle<T: 'static>;
// Required method
fn spawn<F>(&self, future: F) -> Self::JoinHandle<<F as Future>::Output>
where F: Future + Send + 'static,
<F as Future>::Output: Send + 'static;
}Expand description
An executor which futures can be spawned on.
Required Associated Types§
Sourcetype JoinHandle<T: 'static>
type JoinHandle<T: 'static>
A join handle which completes with the output of a future.
JoinHandles have detach-on-drop semantics.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.