[−][src]Trait futures::task::LocalSpawn
The LocalSpawn
is similar to [Spawn]
, but allows spawning futures
that don't implement Send
.
Required Methods
fn spawn_local_obj(
&mut self,
future: LocalFutureObj<'static, ()>
) -> Result<(), SpawnError>
&mut self,
future: LocalFutureObj<'static, ()>
) -> Result<(), SpawnError>
Spawns a future that will be run to completion.
Errors
The executor may be unable to spawn tasks. Spawn errors should represent relatively rare scenarios, such as the executor having been shut down so that it is no longer able to accept tasks.
Provided Methods
fn status_local(&self) -> Result<(), SpawnError>
Determines whether the executor is able to spawn new tasks.
This method will return Ok
when the executor is likely
(but not guaranteed) to accept a subsequent spawn attempt.
Likewise, an Err
return means that spawn
is likely, but
not guaranteed, to yield an error.
Implementors
impl LocalSpawn for LocalSpawner
[src]
impl LocalSpawn for LocalSpawner
fn spawn_local_obj(
&mut self,
future: LocalFutureObj<'static, ()>
) -> Result<(), SpawnError>
[src]
fn spawn_local_obj(
&mut self,
future: LocalFutureObj<'static, ()>
) -> Result<(), SpawnError>
fn status_local(&self) -> Result<(), SpawnError>
[src]
fn status_local(&self) -> Result<(), SpawnError>
impl<'a> LocalSpawn for FuturesUnordered<LocalFutureObj<'a, ()>>
[src]
impl<'a> LocalSpawn for FuturesUnordered<LocalFutureObj<'a, ()>>
fn spawn_local_obj(
&mut self,
future_obj: LocalFutureObj<'static, ()>
) -> Result<(), SpawnError>
[src]
fn spawn_local_obj(
&mut self,
future_obj: LocalFutureObj<'static, ()>
) -> Result<(), SpawnError>
fn status_local(&self) -> Result<(), SpawnError>
[src]
fn status_local(&self) -> Result<(), SpawnError>