pub trait Executor {
type Task<T>: Future<Output = T>
where T: 'static;
// Required methods
fn spawn<F>(&self, future: F) -> Self::Task<F::Output>
where F: Future + Send + 'static,
F::Output: Send + 'static;
fn detach<T>(&self, task: Self::Task<T>);
}
Expand description
An executor which futures can be spawned on.
Required Associated Types§
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.