Trait async_executors::iface::LocalSpawnHandle [−][src]
pub trait LocalSpawnHandle<Out: 'static> {
fn spawn_handle_local_obj(
&self,
future: LocalFutureObj<'static, Out>
) -> Result<JoinHandle<Out>, SpawnError>;
}
Expand description
This is similar to SpawnHandle
except that it allows spawning !Send
futures. Please see
the docs on SpawnHandle
.
Required methods
fn spawn_handle_local_obj(
&self,
future: LocalFutureObj<'static, Out>
) -> Result<JoinHandle<Out>, SpawnError>
fn spawn_handle_local_obj(
&self,
future: LocalFutureObj<'static, Out>
) -> Result<JoinHandle<Out>, SpawnError>
Spawn a future and return a JoinHandle
that can be awaited for the output of the future.
Implementations on Foreign Types
impl<T, Out> LocalSpawnHandle<Out> for Instrumented<T> where
T: LocalSpawnHandle<Out>,
Out: 'static,
This is supported on crate feature tracing
only.
impl<T, Out> LocalSpawnHandle<Out> for Instrumented<T> where
T: LocalSpawnHandle<Out>,
Out: 'static,
This is supported on crate feature
tracing
only.fn spawn_handle_local_obj(
&self,
future: LocalFutureObj<'static, Out>
) -> Result<JoinHandle<Out>, SpawnError>
impl<T, Out> LocalSpawnHandle<Out> for WithDispatch<T> where
T: LocalSpawnHandle<Out>,
Out: 'static,
This is supported on crate feature tracing
only.
impl<T, Out> LocalSpawnHandle<Out> for WithDispatch<T> where
T: LocalSpawnHandle<Out>,
Out: 'static,
This is supported on crate feature
tracing
only.