pub trait LocalExecutor: Executor {
// Required method
fn spawn_local<F>(
&self,
future: F,
) -> Self::JoinHandle<<F as Future>::Output>
where F: Future + 'static,
<F as Future>::Output: 'static;
}Expand description
A local executor which supports spawning non-Send futures.
Required Methods§
Sourcefn spawn_local<F>(&self, future: F) -> Self::JoinHandle<<F as Future>::Output>
fn spawn_local<F>(&self, future: F) -> Self::JoinHandle<<F as Future>::Output>
Spawns the given non-Send future on this executor, returning a
JoinHandle for the task.
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.