@@ -10,6 +10,8 @@ use crate::marker::{PhantomData, Unpin};
1010///
1111/// It consists of a data pointer and a [virtual function pointer table (vtable)][vtable] that
1212/// customizes the behavior of the `RawWaker`.
13+ ///
14+ /// [`Waker`]: struct.Waker.html
1315#[ derive( PartialEq , Debug ) ]
1416#[ stable( feature = "futures_api" , since = "1.36.0" ) ]
1517pub struct RawWaker {
@@ -55,6 +57,8 @@ impl RawWaker {
5557/// pointer of a properly constructed [`RawWaker`] object from inside the
5658/// [`RawWaker`] implementation. Calling one of the contained functions using
5759/// any other `data` pointer will cause undefined behavior.
60+ ///
61+ /// [`RawWaker`]: struct.RawWaker.html
5862#[ stable( feature = "futures_api" , since = "1.36.0" ) ]
5963#[ derive( PartialEq , Copy , Clone , Debug ) ]
6064pub struct RawWakerVTable {
@@ -65,6 +69,9 @@ pub struct RawWakerVTable {
6569 /// required for this additional instance of a [`RawWaker`] and associated
6670 /// task. Calling `wake` on the resulting [`RawWaker`] should result in a wakeup
6771 /// of the same task that would have been awoken by the original [`RawWaker`].
72+ ///
73+ /// [`Waker`]: struct.Waker.html
74+ /// [`RawWaker`]: struct.RawWaker.html
6875 clone : unsafe fn ( * const ( ) ) -> RawWaker ,
6976
7077 /// This function will be called when `wake` is called on the [`Waker`].
@@ -73,20 +80,28 @@ pub struct RawWakerVTable {
7380 /// The implementation of this function must make sure to release any
7481 /// resources that are associated with this instance of a [`RawWaker`] and
7582 /// associated task.
83+ ///
84+ /// [`Waker`]: struct.Waker.html
85+ /// [`RawWaker`]: struct.RawWaker.html
7686 wake : unsafe fn ( * const ( ) ) ,
7787
7888 /// This function will be called when `wake_by_ref` is called on the [`Waker`].
7989 /// It must wake up the task associated with this [`RawWaker`].
8090 ///
8191 /// This function is similar to `wake`, but must not consume the provided data
8292 /// pointer.
93+ ///
94+ /// [`Waker`]: struct.Waker.html
95+ /// [`RawWaker`]: struct.RawWaker.html
8396 wake_by_ref : unsafe fn ( * const ( ) ) ,
8497
8598 /// This function gets called when a [`RawWaker`] gets dropped.
8699 ///
87100 /// The implementation of this function must make sure to release any
88101 /// resources that are associated with this instance of a [`RawWaker`] and
89102 /// associated task.
103+ ///
104+ /// [`RawWaker`]: struct.RawWaker.html
90105 drop : unsafe fn ( * const ( ) ) ,
91106}
92107
@@ -128,6 +143,9 @@ impl RawWakerVTable {
128143 /// The implementation of this function must make sure to release any
129144 /// resources that are associated with this instance of a [`RawWaker`] and
130145 /// associated task.
146+ ///
147+ /// [`Waker`]: struct.Waker.html
148+ /// [`RawWaker`]: struct.RawWaker.html
131149 #[ rustc_promotable]
132150 #[ cfg_attr( stage0, unstable( feature = "futures_api_const_fn_ptr" , issue = "50547" ) ) ]
133151 #[ cfg_attr( not( stage0) , stable( feature = "futures_api" , since = "1.36.0" ) ) ]
@@ -201,6 +219,8 @@ impl fmt::Debug for Context<'_> {
201219/// executor-specific wakeup behavior.
202220///
203221/// Implements [`Clone`], [`Send`], and [`Sync`].
222+ ///
223+ /// [`RawWaker`]: struct.RawWaker.html
204224#[ repr( transparent) ]
205225#[ stable( feature = "futures_api" , since = "1.36.0" ) ]
206226pub struct Waker {
@@ -266,6 +286,9 @@ impl Waker {
266286 /// The behavior of the returned `Waker` is undefined if the contract defined
267287 /// in [`RawWaker`]'s and [`RawWakerVTable`]'s documentation is not upheld.
268288 /// Therefore this method is unsafe.
289+ ///
290+ /// [`RawWaker`]: struct.RawWaker.html
291+ /// [`RawWakerVTable`]: struct.RawWakerVTable.html
269292 #[ inline]
270293 #[ stable( feature = "futures_api" , since = "1.36.0" ) ]
271294 pub unsafe fn from_raw ( waker : RawWaker ) -> Waker {
0 commit comments