1
1
## A Closer Look at the Traits for Async
2
2
3
3
<!-- Old headings. Do not remove or links may break. -->
4
+
4
5
<a id =" digging-into-the-traits-for-async " ></a >
5
6
6
7
Throughout the chapter, we’ve used the ` Future ` , ` Pin ` , ` Unpin ` , ` Stream ` , and
@@ -12,6 +13,7 @@ details. In this section, we’ll dig in just enough to help in those scenarios,
12
13
still leaving the _ really_ deep dive for other documentation.
13
14
14
15
<!-- Old headings. Do not remove or links may break. -->
16
+
15
17
<a id =" future " ></a >
16
18
17
19
### The ` Future ` Trait
@@ -118,6 +120,7 @@ future it is responsible for, putting the future back to sleep when it is not
118
120
yet ready.
119
121
120
122
<!-- Old headings. Do not remove or links may break. -->
123
+
121
124
<a id =" pinning-and-the-pin-and-unpin-traits " ></a >
122
125
123
126
### The ` Pin ` and ` Unpin ` Traits
@@ -210,7 +213,7 @@ enforce constraints on pointer usage.
210
213
211
214
Recalling that ` await ` is implemented in terms of calls to ` poll ` starts to
212
215
explain the error message we saw earlier, but that was in terms of ` Unpin ` , not
213
- ` Pin ` . So how exactly does ` Pin ` relate to ` Unpin ` , and why does ` Future ` need
216
+ ` Pin ` . So how exactly does ` Pin ` relate to ` Unpin ` , and why does ` Future ` need
214
217
` self ` to be in a ` Pin ` type to call ` poll ` ?
215
218
216
219
Remember from earlier in this chapter a series of await points in a future get
0 commit comments