pub struct WasmRuntime;Available on crate feature
wasm only.Expand description
Concrete RuntimeLite implementation based on wasm-bindgen-futures runtime.
Trait Implementations§
Source§impl Clone for WasmRuntime
impl Clone for WasmRuntime
Source§fn clone(&self) -> WasmRuntime
fn clone(&self) -> WasmRuntime
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 WasmRuntime
impl Debug for WasmRuntime
Source§impl Display for WasmRuntime
impl Display for WasmRuntime
Source§impl RuntimeLite for WasmRuntime
impl RuntimeLite for WasmRuntime
Source§type Spawner = WasmSpawner
type Spawner = WasmSpawner
The spawner type for this runtime
Source§type LocalSpawner = WasmSpawner
type LocalSpawner = WasmSpawner
The local spawner type for this runtime
Source§type BlockingSpawner = WasmSpawner
type BlockingSpawner = WasmSpawner
The blocking spawner type for this runtime
Source§type AfterSpawner = WasmSpawner
type AfterSpawner = WasmSpawner
Available on crate feature
time only.The after spawner type for this runtime
Source§type Interval = WasmInterval
type Interval = WasmInterval
Available on crate feature
time only.The interval type for this runtime
Source§type LocalInterval = WasmInterval
type LocalInterval = WasmInterval
Available on crate feature
time only.The local interval type for this runtime
Source§type LocalSleep = WasmSleep
type LocalSleep = WasmSleep
Available on crate feature
time only.The local sleep type for this runtime
Source§type Delay<F> = Delay<F, WasmSleep>
where
F: Future + Send
type Delay<F> = Delay<F, WasmSleep> where F: Future + Send
Available on crate feature
time only.The delay type for this runtime
Source§type LocalDelay<F> = Delay<F, WasmSleep>
where
F: Future
type LocalDelay<F> = Delay<F, WasmSleep> where F: Future
Available on crate feature
time only.The local delay type for this runtime
Source§type Timeout<F> = WasmTimeout<F>
where
F: Future + Send
type Timeout<F> = WasmTimeout<F> where F: Future + Send
Available on crate feature
time only.The timeout type for this runtime
Source§type LocalTimeout<F> = WasmTimeout<F>
where
F: Future
type LocalTimeout<F> = WasmTimeout<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 WasmRuntime
Auto Trait Implementations§
impl Freeze for WasmRuntime
impl RefUnwindSafe for WasmRuntime
impl Send for WasmRuntime
impl Sync for WasmRuntime
impl Unpin for WasmRuntime
impl UnwindSafe for WasmRuntime
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