Open
Description
This is a tracking issue for the RFC "2930" (rust-lang/rfcs#2930).
The feature gate for the issue is #![feature(read_buf)]
.
This is now called BorrowedBuf
rather than ReadBuf
.
About tracking issues
Tracking issues are used to record the overall progress of implementation.
They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions.
A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature.
Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.
Steps
- Implement the RFC
- Initial implementation in Implement most of RFC 2930, providing the ReadBuf abstraction #81156
- Vectorized APIs (
read_buf_vectored
,ReadBufs
).
- Adjust documentation (see instructions on rustc-dev-guide)
- Stabilization PR (see instructions on rustc-dev-guide)
- Note that this is a use of
rustc_must_implement_one_of
, which is a language-observable thing, and thus needs some amount of oversight/documentation about that as a prerequisite of stabilization.
- Note that this is a use of
Unresolved Questions
- Should
read_buf
return the number of bytes read likeread
does or should theReadBuf
track it instead? Some operations, like checking for EOF, are a bit simpler ifread_buf
returns the value, but the confusion around what is and is not trustworthy is worrysome for unsafe code working withRead
implementations. - What should
assume_init
be named? - Should the API use a wrapper around
&mut ReadBuf
to prevent unexpected swapping of the caller-providedReadBuf
? - Resolve soundness issue: Unsound
BufWriter
copy_to specialization with the unstableread_buf
feature #93305
Implementation history
Metadata
Metadata
Assignees
Labels
Area: `std::io`, `std::fs`, `std::net` and `std::path`Blocker: Approved by a merged RFC but not yet implemented.Category: An issue tracking the progress of sth. like the implementation of an RFCLibs issues that are tracked on the team's project board.Relevant to the library API team, which will review and decide on the PR/issue.
Activity