pub struct Sleep<const MICROS: u64> { /* private fields */ }Expand description
A future that resolves after a compile-time-known duration has elapsed.
The const generic MICROS encodes the sleep duration. Must be polled
from within a #[rivet::task] (needs crate::executor::current_task
to register the wake-up).
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<const MICROS: u64> Freeze for Sleep<MICROS>
impl<const MICROS: u64> RefUnwindSafe for Sleep<MICROS>
impl<const MICROS: u64> Send for Sleep<MICROS>
impl<const MICROS: u64> Sync for Sleep<MICROS>
impl<const MICROS: u64> Unpin for Sleep<MICROS>
impl<const MICROS: u64> UnsafeUnpin for Sleep<MICROS>
impl<const MICROS: u64> UnwindSafe for Sleep<MICROS>
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