Skip to content

Commit 143d85e

Browse files
committed
Footnote about AsyncRead/AsyncWrite in no_std
1 parent 8e4e068 commit 143d85e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/vision/roadmap/portable/read_write.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ trait AsyncWrite {
2727

2828
This form doesn't permit one to simultaneously be reading and writing. Moreover, SSL requires changing modes, so that e.g. performing a read may require writing to the underlying socket, and vice versa. (Link?)
2929

30+
Note also that using `std::io::Result` would make the traits unusable in `#[no_std]` (this is also the case with the regular `Read` and `Write` traits), which might preclude embedded uses of these traits. These fundamental traits could all be added to `alloc` (but not `core`, because `std::io::Error` depends on `Box`).
31+
3032
### Variant A: Readiness
3133

3234
One possibility is the design that [CarlLerche proposed](https://gist.github.com/carllerche/5d7037bd55dac1cb72891529a4ff1540), which separates "readiness" from the actual (non-async) methods to acquire the data:

0 commit comments

Comments
 (0)