pub struct Sleep<A>where
A: TimerAccess,{ /* private fields */ }Expand description
短时主动等待;正时长1ms至1s,零时长可立即完成,不暴露取消句柄(handle)。
Implementations§
Trait Implementations§
Source§impl<A> Future for Sleep<A>where
A: TimerAccess,
impl<A> Future for Sleep<A>where
A: TimerAccess,
impl<A> Unpin for Sleep<A>where
A: TimerAccess,
Auto Trait Implementations§
impl<A> !RefUnwindSafe for Sleep<A>
impl<A> !UnwindSafe for Sleep<A>
impl<A> Forget for Sleep<A>
impl<A> Freeze for Sleep<A>
impl<A> Move for Sleep<A>
impl<A> Send for Sleep<A>
impl<A> Sync for Sleep<A>
impl<A> UnsafeUnpin for Sleep<A>
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<Fut> FutureExt for Fut
impl<Fut> FutureExt for Fut
Source§fn attach<A>(self, attachment: A) -> FutureWithAttachment<Fut, A> ⓘwhere
A: Attachment,
fn attach<A>(self, attachment: A) -> FutureWithAttachment<Fut, A> ⓘwhere
A: Attachment,
Source§fn attach_with<A, F>(self, attachment: F) -> FutureWithLazyAttachment<Fut, F> ⓘwhere
A: Attachment,
F: FnOnce() -> A,
fn attach_with<A, F>(self, attachment: F) -> FutureWithLazyAttachment<Fut, F> ⓘwhere
A: Attachment,
F: FnOnce() -> A,
Source§fn attach_opaque<A>(self, attachment: A) -> FutureWithOpaqueAttachment<Fut, A> ⓘwhere
A: OpaqueAttachment,
fn attach_opaque<A>(self, attachment: A) -> FutureWithOpaqueAttachment<Fut, A> ⓘwhere
A: OpaqueAttachment,
Source§fn attach_opaque_with<A, F>(
self,
attachment: F,
) -> FutureWithLazyOpaqueAttachment<Fut, F> ⓘwhere
A: OpaqueAttachment,
F: FnOnce() -> A,
fn attach_opaque_with<A, F>(
self,
attachment: F,
) -> FutureWithLazyOpaqueAttachment<Fut, F> ⓘwhere
A: OpaqueAttachment,
F: FnOnce() -> A,
Source§fn change_context<C>(self, context: C) -> FutureWithContext<Fut, C> ⓘ
fn change_context<C>(self, context: C) -> FutureWithContext<Fut, C> ⓘ
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