pub trait AsyncLocalIntervalExt: AsyncInterval {
// Required methods
fn interval_local(period: Duration) -> Self
where Self: Sized;
fn interval_local_at(start: Self::Instant, period: Duration) -> Self
where Self: Sized;
}Available on crate feature
time only.Expand description
Extension trait for AsyncLocalInterval.
Required Methods§
Sourcefn interval_local(period: Duration) -> Selfwhere
Self: Sized,
fn interval_local(period: Duration) -> Selfwhere
Self: Sized,
Creates a timer that emits events periodically.
Sourcefn interval_local_at(start: Self::Instant, period: Duration) -> Selfwhere
Self: Sized,
fn interval_local_at(start: Self::Instant, period: Duration) -> Selfwhere
Self: Sized,
Creates a timer that emits events periodically, starting at start.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl AsyncLocalIntervalExt for Timer
Available on crate feature async-io only.
impl AsyncLocalIntervalExt for Timer
Available on crate feature
async-io only.Implementors§
impl AsyncLocalIntervalExt for EmbassyInterval
Available on crate feature
embassy only.impl AsyncLocalIntervalExt for TokioInterval
Available on crate feature
tokio only.impl AsyncLocalIntervalExt for WasmInterval
Available on crate feature
wasm only.