Trait agnostic_lite::time::AsyncLocalSleepExt
source · pub trait AsyncLocalSleepExt: AsyncLocalSleep {
// Required methods
fn sleep_local(after: Duration) -> Self
where Self: Sized;
fn sleep_local_until(deadline: Instant) -> Self
where Self: Sized;
}Available on crate feature
time only.Expand description
Extension trait for AsyncLocalSleep.
Required Methods§
sourcefn sleep_local(after: Duration) -> Selfwhere
Self: Sized,
fn sleep_local(after: Duration) -> Selfwhere
Self: Sized,
Creates a timer that emits an event once after the given duration of time.
sourcefn sleep_local_until(deadline: Instant) -> Selfwhere
Self: Sized,
fn sleep_local_until(deadline: Instant) -> Selfwhere
Self: Sized,
Creates a timer that emits an event once at the given time instant.
Implementors§
impl AsyncLocalSleepExt for AsyncIoSleep
Available on crate feature
async-io only.impl AsyncLocalSleepExt for TokioSleep
Available on crate feature
tokio only.impl AsyncLocalSleepExt for WasmSleep
Available on crate feature
wasm only.