pub struct RelayScopeSpawner<'sc> { /* private fields */ }Expand description
A spawner that can be obtained from RelayScope::spawner.
This spawner may live longer then the scope.
In case a future is spawned after the scope has been destroyed,
the spawner will return SpawnError::shutdown.
Trait Implementations§
Source§impl<'sc> Clone for RelayScopeSpawner<'sc>
impl<'sc> Clone for RelayScopeSpawner<'sc>
Source§impl<'sc> Debug for RelayScopeSpawner<'sc>
impl<'sc> Debug for RelayScopeSpawner<'sc>
Source§impl<'sc> ScopedSpawn<'sc, ()> for RelayScopeSpawner<'sc>
impl<'sc> ScopedSpawn<'sc, ()> for RelayScopeSpawner<'sc>
Source§fn spawn_obj_scoped(&self, future: FutureObj<'sc, ()>) -> Result<(), SpawnError>
fn spawn_obj_scoped(&self, future: FutureObj<'sc, ()>) -> Result<(), SpawnError>
Spawns a task that polls the given future. Read more
Source§fn status_scoped(&self) -> Result<(), SpawnError>
fn status_scoped(&self) -> Result<(), SpawnError>
Determines whether the scope is able to spawn new tasks. Read more
Source§impl<'sc> Spawn for RelayScopeSpawner<'sc>
impl<'sc> Spawn for RelayScopeSpawner<'sc>
Auto Trait Implementations§
impl<'sc> Freeze for RelayScopeSpawner<'sc>
impl<'sc> !RefUnwindSafe for RelayScopeSpawner<'sc>
impl<'sc> Send for RelayScopeSpawner<'sc>
impl<'sc> Sync for RelayScopeSpawner<'sc>
impl<'sc> Unpin for RelayScopeSpawner<'sc>
impl<'sc> !UnwindSafe for RelayScopeSpawner<'sc>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Sp> RelayScopeSpawning for Sp
impl<Sp> RelayScopeSpawning for Sp
Source§fn spawn_scope<'sc>(&self, scope: &RelayScope<'sc>) -> Result<(), SpawnError>where
Self: 'sc,
fn spawn_scope<'sc>(&self, scope: &RelayScope<'sc>) -> Result<(), SpawnError>where
Self: 'sc,
Add this spawn to
scope and relay spawned futures to it.Source§impl<'sc, T, Sp> ScopedSpawnExt<'sc, T> for Spwhere
Sp: ScopedSpawn<'sc, T> + ?Sized,
impl<'sc, T, Sp> ScopedSpawnExt<'sc, T> for Spwhere
Sp: ScopedSpawn<'sc, T> + ?Sized,
Source§fn spawn_scoped<Fut>(&self, future: Fut) -> Result<(), SpawnError>
fn spawn_scoped<Fut>(&self, future: Fut) -> Result<(), SpawnError>
Spawns a task that polls the given future. Read more
Source§fn spawn_scoped_with_handle<Fut>(
&self,
future: Fut,
) -> Result<RemoteHandle<Fut::Output>, SpawnError>
fn spawn_scoped_with_handle<Fut>( &self, future: Fut, ) -> Result<RemoteHandle<Fut::Output>, SpawnError>
Spawns a task that polls the given future and returns a handle to its output. Read more
Source§impl<Sp> SpawnExt for Sp
impl<Sp> SpawnExt for Sp
Source§fn spawn<Fut>(&self, future: Fut) -> Result<(), SpawnError>
fn spawn<Fut>(&self, future: Fut) -> Result<(), SpawnError>
Spawns a task that polls the given future with output
() to
completion. Read moreSource§fn spawn_with_handle<Fut>(
&self,
future: Fut,
) -> Result<RemoteHandle<<Fut as Future>::Output>, SpawnError>
fn spawn_with_handle<Fut>( &self, future: Fut, ) -> Result<RemoteHandle<<Fut as Future>::Output>, SpawnError>
Spawns a task that polls the given future to completion and returns a
future that resolves to the spawned future’s output. Read more