Struct async_executors::LocalSpawner
source · pub struct LocalSpawner { /* private fields */ }
Trait Implementations§
source§impl Clone for LocalSpawner
impl Clone for LocalSpawner
source§fn clone(&self) -> LocalSpawner
fn clone(&self) -> LocalSpawner
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for LocalSpawner
impl Debug for LocalSpawner
source§impl LocalSpawn for LocalSpawner
impl LocalSpawn for LocalSpawner
source§fn spawn_local_obj(
&self,
future: LocalFutureObj<'static, ()>
) -> Result<(), SpawnError>
fn spawn_local_obj( &self, future: LocalFutureObj<'static, ()> ) -> Result<(), SpawnError>
Spawns a future that will be run to completion. Read more
source§fn status_local(&self) -> Result<(), SpawnError>
fn status_local(&self) -> Result<(), SpawnError>
Determines whether the executor is able to spawn new tasks. Read more
source§impl<Out: 'static> LocalSpawnHandle<Out> for LocalSpawner
impl<Out: 'static> LocalSpawnHandle<Out> for LocalSpawner
source§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.source§impl Spawn for LocalSpawner
impl Spawn for LocalSpawner
source§impl<Out: 'static + Send> SpawnHandle<Out> for LocalSpawner
impl<Out: 'static + Send> SpawnHandle<Out> for LocalSpawner
source§fn spawn_handle_obj(
&self,
future: FutureObj<'static, Out>
) -> Result<JoinHandle<Out>, SpawnError>
fn spawn_handle_obj( &self, future: FutureObj<'static, Out> ) -> Result<JoinHandle<Out>, SpawnError>
Spawn a future and return a
JoinHandle
that can be awaited for the output of the future.source§impl Timer for LocalSpawner
Available on crate features timer
and async_global
only.
impl Timer for LocalSpawner
Available on crate features
timer
and async_global
only.source§impl YieldNow for LocalSpawner
impl YieldNow for LocalSpawner
source§fn yield_now(&self) -> YieldNowFut ⓘ
fn yield_now(&self) -> YieldNowFut ⓘ
Await this future in order to yield to the executor.
Auto Trait Implementations§
impl !RefUnwindSafe for LocalSpawner
impl !Send for LocalSpawner
impl !Sync for LocalSpawner
impl Unpin for LocalSpawner
impl !UnwindSafe for LocalSpawner
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> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<Sp> LocalSpawnExt for Spwhere
Sp: LocalSpawn + ?Sized,
impl<Sp> LocalSpawnExt for Spwhere Sp: LocalSpawn + ?Sized,
source§fn spawn_local<Fut>(&self, future: Fut) -> Result<(), SpawnError>where
Fut: Future<Output = ()> + 'static,
fn spawn_local<Fut>(&self, future: Fut) -> Result<(), SpawnError>where Fut: Future<Output = ()> + 'static,
Spawns a task that polls the given future with output
()
to
completion. Read moresource§fn spawn_local_with_handle<Fut>(
&self,
future: Fut
) -> Result<RemoteHandle<<Fut as Future>::Output>, SpawnError>where
Fut: Future + 'static,
fn spawn_local_with_handle<Fut>( &self, future: Fut ) -> Result<RemoteHandle<<Fut as Future>::Output>, SpawnError>where Fut: Future + 'static,
Spawns a task that polls the given future to completion and returns a
future that resolves to the spawned future’s output. Read more
source§impl<T, Out> LocalSpawnHandleExt<Out> for Twhere
T: LocalSpawnHandle<Out> + ?Sized,
Out: 'static,
impl<T, Out> LocalSpawnHandleExt<Out> for Twhere T: LocalSpawnHandle<Out> + ?Sized, Out: 'static,
source§fn spawn_handle_local(
&self,
future: impl Future<Output = Out> + 'static
) -> Result<JoinHandle<Out>, SpawnError>
fn spawn_handle_local( &self, future: impl Future<Output = Out> + 'static ) -> Result<JoinHandle<Out>, SpawnError>
Convenience trait for passing in a generic future to
LocalSpawnHandle
. Much akin to LocalSpawn
and LocalSpawnExt
in the
futures library.§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<Sp> SpawnExt for Spwhere
Sp: Spawn + ?Sized,
impl<Sp> SpawnExt for Spwhere Sp: Spawn + ?Sized,
source§fn spawn<Fut>(&self, future: Fut) -> Result<(), SpawnError>where
Fut: Future<Output = ()> + Send + 'static,
fn spawn<Fut>(&self, future: Fut) -> Result<(), SpawnError>where Fut: Future<Output = ()> + Send + 'static,
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>where
Fut: Future + Send + 'static,
<Fut as Future>::Output: Send,
fn spawn_with_handle<Fut>( &self, future: Fut ) -> Result<RemoteHandle<<Fut as Future>::Output>, SpawnError>where Fut: Future + Send + 'static, <Fut as Future>::Output: Send,
Spawns a task that polls the given future to completion and returns a
future that resolves to the spawned future’s output. Read more
source§impl<T, Out> SpawnHandleExt<Out> for Twhere
T: SpawnHandle<Out> + ?Sized,
Out: 'static + Send,
impl<T, Out> SpawnHandleExt<Out> for Twhere T: SpawnHandle<Out> + ?Sized, Out: 'static + Send,
source§fn spawn_handle(
&self,
future: impl Future<Output = Out> + Send + 'static
) -> Result<JoinHandle<Out>, SpawnError>
fn spawn_handle( &self, future: impl Future<Output = Out> + Send + 'static ) -> Result<JoinHandle<Out>, SpawnError>
Spawn a future and return a JoinHandle that can be awaited for the output of the future.