Commit 753ca72
authored
Document cancel safety of reading from WebSocketStream (#378)
Closes #359. Reading messages is cancel-safe because WebSocketStream
exposes messages only through its Stream implementation, so reading via
StreamExt::next inherits that trait's cancel-safety. This was confirmed
in #359 but never landed in the rustdoc, so a user had to find the
GitHub issue to learn it.
Add a `# Cancel safety` section to the WebSocketStream docs stating the
read guarantee, and note that the Sink (sending) side carries no
documented guarantee.
Co-authored-by: JustinCMR <JustinCMR@users.noreply.github.com>1 parent 751d7e2 commit 753ca72
1 file changed
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
191 | 203 | | |
192 | 204 | | |
193 | 205 | | |
| |||
0 commit comments