Expand description
Definitions for SleepProviderExt and related types.
Re-exportsยง
use crate::traits::SleepProvider;๐use futures::Future;๐use futures::FutureExt;๐use pin_project::pin_project;๐use std::pin::Pin;๐use std::task::Context;๐use std::task::Poll;๐use web_time_compat::Duration;๐use web_time_compat::Instant;๐use web_time_compat::SystemTime;๐
Structsยง
- Sleep
Until Wallclock - A future implementing
SleepProviderExt::sleep_until_wallclock. - Timeout
- A timeout returned by
SleepProviderExt::timeout. - Timeout
Error - An error value given when a function times out.
Constantsยง
- MAX_
SLEEP ๐ - We never sleep more than this much, in case our system clock jumps.
Traitsยง
- Sleep
Provider Ext - An extension trait on
SleepProviderfor timeouts and clock delays.
Functionsยง
- calc_
next_ ๐delay - Return the amount of time we should wait next, when running sleep_until_wallclock(). Also return a boolean indicating whether we expect this to be the final delay.