pub struct SmolRuntime;Available on crate feature
smol only.Expand description
Concrete RuntimeLite implementation based on smol runtime.
Trait Implementations§
Source§impl Clone for SmolRuntime
impl Clone for SmolRuntime
Source§fn clone(&self) -> SmolRuntime
fn clone(&self) -> SmolRuntime
Returns a duplicate 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 SmolRuntime
impl Debug for SmolRuntime
Source§impl Display for SmolRuntime
impl Display for SmolRuntime
Source§impl RuntimeLite for SmolRuntime
impl RuntimeLite for SmolRuntime
Source§type Spawner = SmolSpawner
type Spawner = SmolSpawner
The spawner type for this runtime
Source§type LocalSpawner = SmolSpawner
type LocalSpawner = SmolSpawner
The local spawner type for this runtime
Source§type BlockingSpawner = SmolSpawner
type BlockingSpawner = SmolSpawner
The blocking spawner type for this runtime
Source§type AfterSpawner = SmolSpawner
type AfterSpawner = SmolSpawner
Available on crate feature
time only.The after spawner type for this runtime
Source§type LocalInterval = Timer
type LocalInterval = Timer
Available on crate feature
time only.The local interval type for this runtime
Source§type Sleep = AsyncIoSleep
type Sleep = AsyncIoSleep
Available on crate feature
time only.The sleep type for this runtime
Source§type LocalSleep = AsyncIoSleep
type LocalSleep = AsyncIoSleep
Available on crate feature
time only.The local sleep type for this runtime
Source§type Delay<F> = Delay<F, AsyncIoSleep>
where
F: Future + Send
type Delay<F> = Delay<F, AsyncIoSleep> where F: Future + Send
Available on crate feature
time only.The delay type for this runtime
Source§type LocalDelay<F> = Delay<F, AsyncIoSleep>
where
F: Future
type LocalDelay<F> = Delay<F, AsyncIoSleep> where F: Future
Available on crate feature
time only.The local delay type for this runtime
Source§type Timeout<F> = AsyncIoTimeout<F>
where
F: Future + Send
type Timeout<F> = AsyncIoTimeout<F> where F: Future + Send
Available on crate feature
time only.The timeout type for this runtime
Source§type LocalTimeout<F> = AsyncIoTimeout<F>
where
F: Future
type LocalTimeout<F> = AsyncIoTimeout<F> where F: Future
Available on crate feature
time only.The local timeout type for this runtime
Source§fn interval(interval: Duration) -> Self::Interval
fn interval(interval: Duration) -> Self::Interval
Available on crate feature
time only.Create a new interval that starts at the current time and
yields every
period durationSource§fn interval_at(start: Instant, period: Duration) -> Self::Interval
fn interval_at(start: Instant, period: Duration) -> Self::Interval
Available on crate feature
time only.Create a new interval that starts at the given instant and
yields every
period durationSource§fn interval_local(interval: Duration) -> Self::LocalInterval
fn interval_local(interval: Duration) -> Self::LocalInterval
Available on crate feature
time only.Create a new interval that starts at the current time and
yields every
period durationSource§fn interval_local_at(start: Instant, period: Duration) -> Self::LocalInterval
fn interval_local_at(start: Instant, period: Duration) -> Self::LocalInterval
Available on crate feature
time only.Create a new interval that starts at the given instant and
yields every
period durationSource§fn sleep(duration: Duration) -> Self::Sleep
fn sleep(duration: Duration) -> Self::Sleep
Available on crate feature
time only.Create a new sleep future that completes after the given duration
has elapsed
Source§fn sleep_until(instant: Instant) -> Self::Sleep
fn sleep_until(instant: Instant) -> Self::Sleep
Available on crate feature
time only.Create a new sleep future that completes at the given instant
has elapsed
Source§fn sleep_local(duration: Duration) -> Self::LocalSleep
fn sleep_local(duration: Duration) -> Self::LocalSleep
Available on crate feature
time only.Create a new sleep future that completes after the given duration
has elapsed
Source§fn sleep_local_until(instant: Instant) -> Self::LocalSleep
fn sleep_local_until(instant: Instant) -> Self::LocalSleep
Available on crate feature
time only.Create a new sleep future that completes at the given instant
has elapsed
Source§fn delay<F>(duration: Duration, fut: F) -> Self::Delay<F>
fn delay<F>(duration: Duration, fut: F) -> Self::Delay<F>
Available on crate feature
time only.Create a new delay future that runs the
fut after the given duration
has elapsed. The Future will never be polled until the duration has
elapsed. Read moreSource§fn delay_local<F>(duration: Duration, fut: F) -> Self::LocalDelay<F>where
F: Future,
fn delay_local<F>(duration: Duration, fut: F) -> Self::LocalDelay<F>where
F: Future,
Available on crate feature
time only.Source§fn delay_at<F>(deadline: Instant, fut: F) -> Self::Delay<F>
fn delay_at<F>(deadline: Instant, fut: F) -> Self::Delay<F>
Available on crate feature
time only.Create a new timeout future that runs the
future after the given deadline.
The Future will never be polled until the deadline has reached. Read moreSource§fn delay_local_at<F>(deadline: Instant, fut: F) -> Self::LocalDelay<F>where
F: Future,
fn delay_local_at<F>(deadline: Instant, fut: F) -> Self::LocalDelay<F>where
F: Future,
Available on crate feature
time only.Source§fn timeout<F>(duration: Duration, future: F) -> Self::Timeout<F>
fn timeout<F>(duration: Duration, future: F) -> Self::Timeout<F>
Available on crate feature
time only.Requires a
Future to complete before the specified duration has elapsed. Read moreSource§fn timeout_at<F>(deadline: Instant, future: F) -> Self::Timeout<F>
fn timeout_at<F>(deadline: Instant, future: F) -> Self::Timeout<F>
Available on crate feature
time only.Requires a
Future to complete before the specified instant in time. Read moreSource§fn timeout_local<F>(duration: Duration, future: F) -> Self::LocalTimeout<F>where
F: Future,
fn timeout_local<F>(duration: Duration, future: F) -> Self::LocalTimeout<F>where
F: Future,
Available on crate feature
time only.Source§fn timeout_local_at<F>(deadline: Instant, future: F) -> Self::LocalTimeout<F>where
F: Future,
fn timeout_local_at<F>(deadline: Instant, future: F) -> Self::LocalTimeout<F>where
F: Future,
Available on crate feature
time only.Like
timeout_at, but does not requrie the future to be Send.
Requires a Future to complete before the specified duration has elapsed. Read moreSource§fn spawn<F>(future: F) -> <Self::Spawner as AsyncSpawner>::JoinHandle<F::Output>
fn spawn<F>(future: F) -> <Self::Spawner as AsyncSpawner>::JoinHandle<F::Output>
Spawn a future onto the runtime
Source§fn spawn_detach<F>(future: F)
fn spawn_detach<F>(future: F)
Spawn a future onto the runtime and detach it
Source§fn spawn_local<F>(
future: F,
) -> <Self::LocalSpawner as AsyncLocalSpawner>::JoinHandle<F::Output>
fn spawn_local<F>( future: F, ) -> <Self::LocalSpawner as AsyncLocalSpawner>::JoinHandle<F::Output>
Spawn a future onto the local runtime
Source§fn spawn_local_detach<F>(future: F)
fn spawn_local_detach<F>(future: F)
Spawn a future onto the local runtime and detach it
Source§fn spawn_blocking<F, R>(
f: F,
) -> <Self::BlockingSpawner as AsyncBlockingSpawner>::JoinHandle<R>
fn spawn_blocking<F, R>( f: F, ) -> <Self::BlockingSpawner as AsyncBlockingSpawner>::JoinHandle<R>
Spawn a blocking function onto the runtime
Source§fn spawn_blocking_detach<F, R>(f: F)
fn spawn_blocking_detach<F, R>(f: F)
Spawn a blocking function onto the runtime and detach it
Source§fn now() -> Self::Instant
fn now() -> Self::Instant
Available on crate feature
time only.Returns an instant corresponding to “now”.
Source§fn spawn_after<F>(
duration: Duration,
future: F,
) -> <Self::AfterSpawner as AsyncAfterSpawner>::JoinHandle<F::Output>
fn spawn_after<F>( duration: Duration, future: F, ) -> <Self::AfterSpawner as AsyncAfterSpawner>::JoinHandle<F::Output>
Available on crate feature
time only.Spawn a future onto the runtime and run the given future after the given duration
Source§fn spawn_after_at<F>(
at: Self::Instant,
future: F,
) -> <Self::AfterSpawner as AsyncAfterSpawner>::JoinHandle<F::Output>
fn spawn_after_at<F>( at: Self::Instant, future: F, ) -> <Self::AfterSpawner as AsyncAfterSpawner>::JoinHandle<F::Output>
Available on crate feature
time only.Spawn a future onto the runtime and run the given future after the given instant.
impl Copy for SmolRuntime
Auto Trait Implementations§
impl Freeze for SmolRuntime
impl RefUnwindSafe for SmolRuntime
impl Send for SmolRuntime
impl Sync for SmolRuntime
impl Unpin for SmolRuntime
impl UnwindSafe for SmolRuntime
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