You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/vision/roadmap/portable/read_write.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,6 +27,8 @@ trait AsyncWrite {
27
27
28
28
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?)
29
29
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
+
30
32
### Variant A: Readiness
31
33
32
34
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