pub struct AsyncStdSpawner;
Available on crate feature
async-std
only.Expand description
A AsyncSpawner
that uses the async-std
runtime.
Trait Implementations§
Source§impl AsyncAfterSpawner for AsyncStdSpawner
impl AsyncAfterSpawner for AsyncStdSpawner
Source§type JoinError = Infallible
type JoinError = Infallible
The join error type for the join handle
Source§type JoinHandle<F: Send + 'static> = AsyncStdAfterHandle<F>
type JoinHandle<F: Send + 'static> = AsyncStdAfterHandle<F>
The handle returned by the spawner when a future is spawned.
Source§fn spawn_after<F>(
duration: Duration,
future: F,
) -> <AsyncStdSpawner as AsyncAfterSpawner>::JoinHandle<<F as Future>::Output>
fn spawn_after<F>( duration: Duration, future: F, ) -> <AsyncStdSpawner as AsyncAfterSpawner>::JoinHandle<<F as Future>::Output>
Spawn a future onto the runtime and run the given future after the given duration
Source§fn spawn_after_at<F>(
instant: Instant,
future: F,
) -> <AsyncStdSpawner as AsyncAfterSpawner>::JoinHandle<<F as Future>::Output>
fn spawn_after_at<F>( instant: Instant, future: F, ) -> <AsyncStdSpawner as AsyncAfterSpawner>::JoinHandle<<F as Future>::Output>
Spawn a future onto the runtime and run the given future after reach the given instant
Source§fn spawn_after_detach<F>(duration: Duration, future: F)
fn spawn_after_detach<F>(duration: Duration, future: F)
Spawn and detach a future onto the runtime and run the given future after the given duration
Source§impl AsyncBlockingSpawner for AsyncStdSpawner
impl AsyncBlockingSpawner for AsyncStdSpawner
Source§type JoinHandle<R: Send + 'static> = JoinHandle<R>
type JoinHandle<R: Send + 'static> = JoinHandle<R>
The join handle type for blocking tasks
Source§fn spawn_blocking<F, R>(
f: F,
) -> <AsyncStdSpawner as AsyncBlockingSpawner>::JoinHandle<R>
fn spawn_blocking<F, R>( f: F, ) -> <AsyncStdSpawner as AsyncBlockingSpawner>::JoinHandle<R>
Spawn a blocking function onto the runtime
Source§impl AsyncLocalAfterSpawner for AsyncStdSpawner
impl AsyncLocalAfterSpawner for AsyncStdSpawner
Source§type JoinError = Infallible
type JoinError = Infallible
The join error type for the join handle
Source§type JoinHandle<F: 'static> = AsyncStdAfterHandle<F>
type JoinHandle<F: 'static> = AsyncStdAfterHandle<F>
The handle returned by the spawner when a future is spawned.
Source§fn spawn_local_after<F>(
duration: Duration,
future: F,
) -> <AsyncStdSpawner as AsyncLocalAfterSpawner>::JoinHandle<<F as Future>::Output>
fn spawn_local_after<F>( duration: Duration, future: F, ) -> <AsyncStdSpawner as AsyncLocalAfterSpawner>::JoinHandle<<F as Future>::Output>
Spawn a future onto the runtime and run the given future after the given duration
Source§fn spawn_local_after_at<F>(
instant: Instant,
future: F,
) -> <AsyncStdSpawner as AsyncLocalAfterSpawner>::JoinHandle<<F as Future>::Output>
fn spawn_local_after_at<F>( instant: Instant, future: F, ) -> <AsyncStdSpawner as AsyncLocalAfterSpawner>::JoinHandle<<F as Future>::Output>
Spawn a future onto the runtime and run the given future after reach the given instant
Source§fn spawn_local_after_detach<F>(duration: Duration, future: F)
fn spawn_local_after_detach<F>(duration: Duration, future: F)
Spawn and detach a future onto the runtime and run the given future after the given duration
Source§impl AsyncLocalSpawner for AsyncStdSpawner
impl AsyncLocalSpawner for AsyncStdSpawner
Source§type JoinHandle<F: 'static> = JoinHandle<F>
type JoinHandle<F: 'static> = JoinHandle<F>
The handle returned by the spawner when a future is spawned.
Source§fn spawn_local<F>(
future: F,
) -> <AsyncStdSpawner as AsyncLocalSpawner>::JoinHandle<<F as Future>::Output>
fn spawn_local<F>( future: F, ) -> <AsyncStdSpawner as AsyncLocalSpawner>::JoinHandle<<F as Future>::Output>
Spawn a future.
Source§impl AsyncSpawner for AsyncStdSpawner
impl AsyncSpawner for AsyncStdSpawner
Source§type JoinHandle<F: Send + 'static> = JoinHandle<F>
type JoinHandle<F: Send + 'static> = JoinHandle<F>
The handle returned by the spawner when a future is spawned.
Source§fn spawn<F>(
future: F,
) -> <AsyncStdSpawner as AsyncSpawner>::JoinHandle<<F as Future>::Output>
fn spawn<F>( future: F, ) -> <AsyncStdSpawner as AsyncSpawner>::JoinHandle<<F as Future>::Output>
Spawn a future.
Source§impl Clone for AsyncStdSpawner
impl Clone for AsyncStdSpawner
Source§fn clone(&self) -> AsyncStdSpawner
fn clone(&self) -> AsyncStdSpawner
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 AsyncStdSpawner
impl Debug for AsyncStdSpawner
Source§impl Yielder for AsyncStdSpawner
impl Yielder for AsyncStdSpawner
impl Copy for AsyncStdSpawner
Auto Trait Implementations§
impl Freeze for AsyncStdSpawner
impl RefUnwindSafe for AsyncStdSpawner
impl Send for AsyncStdSpawner
impl Sync for AsyncStdSpawner
impl Unpin for AsyncStdSpawner
impl UnwindSafe for AsyncStdSpawner
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<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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more