pub struct Sleep { /* private fields */ }Expand description
A future that completes at its deadline. Made by sleep and
sleep_until.
Polled on one of nuclei’s shards, it arms a timer in that shard’s wheel; polled anywhere else (another runtime’s thread), it asks a shard of the current runtime (or the default one) to fire it. Dropping it cancels the timer.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Sleep
impl !UnwindSafe for Sleep
impl Freeze for Sleep
impl Send for Sleep
impl Sync for Sleep
impl Unpin for Sleep
impl UnsafeUnpin for Sleep
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
Source§impl<F> IntoFuture for Fwhere
F: Future,
impl<F> IntoFuture for Fwhere
F: Future,
Source§type IntoFuture = F
type IntoFuture = F
Which kind of future are we turning this into?
Source§fn into_future(self) -> <F as IntoFuture>::IntoFuture
fn into_future(self) -> <F as IntoFuture>::IntoFuture
Creates a future from a value. Read more