mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 16:54:01 +00:00
Futures: Add link to Waker in trait doc.
This commit is contained in:
parent
ae65848d9e
commit
325c6a56c2
@ -17,11 +17,13 @@ use crate::task::{Context, Poll};
|
||||
/// final value. This method does not block if the value is not ready. Instead,
|
||||
/// the current task is scheduled to be woken up when it's possible to make
|
||||
/// further progress by `poll`ing again. The `context` passed to the `poll`
|
||||
/// method can provide a `Waker`, which is a handle for waking up the current
|
||||
/// method can provide a [`Waker`], which is a handle for waking up the current
|
||||
/// task.
|
||||
///
|
||||
/// When using a future, you generally won't call `poll` directly, but instead
|
||||
/// `.await` the value.
|
||||
///
|
||||
/// [`Waker`]: ../task/struct.Waker.html
|
||||
#[doc(spotlight)]
|
||||
#[must_use = "futures do nothing unless you `.await` or poll them"]
|
||||
#[stable(feature = "futures_api", since = "1.36.0")]
|
||||
|
Loading…
Reference in New Issue
Block a user