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
embedded-io-async: clarify cancel safety of Read and Write (#719)
The previous documentation used permissive language ("encouraged",
"implementations should document") that left callers uncertain about
what happens to data in flight when a future is dropped mid-transfer.
Replace the vague encouragement with normative documentation that:
- States explicitly the method is NOT cancel-safe by default
- Describes the concrete failure mode: bytes already received from
hardware FIFO/DMA may be silently discarded with no error returned
- Uses SHOULD/MUST language consistent with the rest of the trait docs
- Mentions the CancelSafeRead marker trait path for future opt-in
- Gives callers actionable guidance (run future to completion)
This follows the pattern established by Tokio's cancel-safety
documentation and PR #469 ("io: expand docs"), closing the gap that
issue #719 identified.
Fixes#719
Signed-off-by: aki1770-del <aki1770@gmail.com>
0 commit comments