@@ -8,15 +8,17 @@ use marker::Unpin;
8
8
/// A `RawWaker` allows the implementor of a task executor to create a `Waker`
9
9
/// which provides customized wakeup behavior.
10
10
///
11
- /// It consists of a data pointer and a virtual function pointer table (vtable) that
11
+ /// [vtable]: https://en.wikipedia.org/wiki/Virtual_method_table
12
+ ///
13
+ /// It consists of a data pointer and a [virtual function pointer table (vtable)][vtable] that
12
14
/// customizes the behavior of the `RawWaker`.
13
15
#[ derive( PartialEq ) ]
14
16
pub struct RawWaker {
15
17
/// A data pointer, which can be used to store arbitrary data as required
16
18
/// by the executor. This could be e.g. a type-erased pointer to an `Arc`
17
19
/// that is associated with the task.
18
20
/// The value of this field gets passed to all functions that are part of
19
- /// the vtable as first parameter.
21
+ /// the vtable as the first parameter.
20
22
pub data : * const ( ) ,
21
23
/// Virtual function pointer table that customizes the behavior of this waker.
22
24
pub vtable : & ' static RawWakerVTable ,
@@ -30,7 +32,7 @@ impl fmt::Debug for RawWaker {
30
32
}
31
33
32
34
/// A virtual function pointer table (vtable) that specifies the behavior
33
- /// of a `RawWaker`.
35
+ /// of a [ `RawWaker`] .
34
36
///
35
37
/// The pointer passed to all functions inside the vtable is the `data` pointer
36
38
/// from the enclosing `RawWaker` object.
@@ -105,7 +107,7 @@ impl Waker {
105
107
/// contract to make it usable for `Waker` and is therefore unsafe.
106
108
pub unsafe fn new_unchecked ( waker : RawWaker ) -> Waker {
107
109
Waker {
108
- waker : waker ,
110
+ waker,
109
111
}
110
112
}
111
113
}
0 commit comments