pub struct SmolSpawner;
Available on crate feature
smol
only.Expand description
A AsyncSpawner
that uses the smol
runtime.
Trait Implementations§
Source§impl AsyncAfterSpawner for SmolSpawner
impl AsyncAfterSpawner for SmolSpawner
Source§type JoinHandle<F: Send + 'static> = SmolAfterHandle<F>
type JoinHandle<F: Send + 'static> = SmolAfterHandle<F>
The handle returned by the spawner when a future is spawned.
Source§fn spawn_after<F>(
duration: Duration,
future: F,
) -> <SmolSpawner as AsyncAfterSpawner>::JoinHandle<<F as Future>::Output>
fn spawn_after<F>( duration: Duration, future: F, ) -> <SmolSpawner 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,
) -> <SmolSpawner as AsyncAfterSpawner>::JoinHandle<<F as Future>::Output>
fn spawn_after_at<F>( instant: Instant, future: F, ) -> <SmolSpawner 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 SmolSpawner
impl AsyncBlockingSpawner for SmolSpawner
Source§type JoinHandle<R: Send + 'static> = Task<R>
type JoinHandle<R: Send + 'static> = Task<R>
The join handle type for blocking tasks
Source§fn spawn_blocking<F, R>(
f: F,
) -> <SmolSpawner as AsyncBlockingSpawner>::JoinHandle<R>
fn spawn_blocking<F, R>( f: F, ) -> <SmolSpawner as AsyncBlockingSpawner>::JoinHandle<R>
Spawn a blocking function onto the runtime
Source§impl AsyncLocalAfterSpawner for SmolSpawner
impl AsyncLocalAfterSpawner for SmolSpawner
Source§type JoinHandle<F: 'static> = SmolAfterHandle<F>
type JoinHandle<F: 'static> = SmolAfterHandle<F>
The handle returned by the spawner when a future is spawned.
Source§fn spawn_local_after<F>(
duration: Duration,
future: F,
) -> <SmolSpawner as AsyncLocalAfterSpawner>::JoinHandle<<F as Future>::Output>
fn spawn_local_after<F>( duration: Duration, future: F, ) -> <SmolSpawner 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,
) -> <SmolSpawner as AsyncLocalAfterSpawner>::JoinHandle<<F as Future>::Output>
fn spawn_local_after_at<F>( instant: Instant, future: F, ) -> <SmolSpawner 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 SmolSpawner
impl AsyncLocalSpawner for SmolSpawner
Source§type JoinHandle<F: 'static> = Task<F>
type JoinHandle<F: 'static> = Task<F>
The handle returned by the spawner when a future is spawned.
Source§fn spawn_local<F>(
future: F,
) -> <SmolSpawner as AsyncLocalSpawner>::JoinHandle<<F as Future>::Output>
fn spawn_local<F>( future: F, ) -> <SmolSpawner as AsyncLocalSpawner>::JoinHandle<<F as Future>::Output>
Spawn a future.
Source§impl AsyncSpawner for SmolSpawner
impl AsyncSpawner for SmolSpawner
Source§type JoinHandle<F: Send + 'static> = Task<F>
type JoinHandle<F: Send + 'static> = Task<F>
The handle returned by the spawner when a future is spawned.
Source§fn spawn<F>(
future: F,
) -> <SmolSpawner as AsyncSpawner>::JoinHandle<<F as Future>::Output>
fn spawn<F>( future: F, ) -> <SmolSpawner as AsyncSpawner>::JoinHandle<<F as Future>::Output>
Spawn a future.
Source§impl Clone for SmolSpawner
impl Clone for SmolSpawner
Source§fn clone(&self) -> SmolSpawner
fn clone(&self) -> SmolSpawner
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 SmolSpawner
impl Debug for SmolSpawner
Source§impl Yielder for SmolSpawner
impl Yielder for SmolSpawner
impl Copy for SmolSpawner
Auto Trait Implementations§
impl Freeze for SmolSpawner
impl RefUnwindSafe for SmolSpawner
impl Send for SmolSpawner
impl Sync for SmolSpawner
impl Unpin for SmolSpawner
impl UnwindSafe for SmolSpawner
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