Struct async_spin_sleep::Handle
source · pub struct Handle { /* private fields */ }Implementations§
source§impl Handle
impl Handle
sourcepub fn sleep_for(&self, duration: Duration) -> SleepFuture ⓘ
pub fn sleep_for(&self, duration: Duration) -> SleepFuture ⓘ
Returns a future that sleeps for the specified duration.
SleepFuture returns the duration that overly passed the specified duration.
sourcepub fn sleep_until(&self, timeout: Instant) -> SleepFuture ⓘ
pub fn sleep_until(&self, timeout: Instant) -> SleepFuture ⓘ
Returns a future that sleeps until the specified instant.
SleepFuture returns the duration that overly passed the specified instant.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Handle
impl Send for Handle
impl Sync for Handle
impl Unpin for Handle
impl UnwindSafe for Handle
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