Tracking Issue for `read_buf_at`
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
Feature gate: #![feature(read_buf_at)]
This is a tracking issue for FileExt::read_buf_at() and related methods, providing positioned reads into unintialized buffers.
#![feature(read_buf)] adds support for reads into unintialized buffers via BorrowedBuf and BorrowedCursor. This feature expands that to reads from specific offsets.
Public API
// std::os::unix::fs
trait FileExt {
// [...] (existing methods)
/// Equivalent to read_at()
fn read_buf_at(&self, buf: BorrowedCursor<'_>, offset: u64) -> io::Result<()>;
/// Equivalent to read_exact_at()
fn read_buf_exact_at(&self, buf: BorrowedCursor<'_>, offset: u64) -> io::Result<()>;
}
// std::os::windows::fs
trait FileExt {
// [...] (existing methods)
/// Equivalent to seek_read()
fn seek_read_buf(&self, buf: BorrowedCursor<'_>, offset: u64) -> io::Result<()>;
}
Steps / History
- https://github.com/rust-lang/libs-team/issues/581
- Implementation: #140459
- Final comment period (FCP)^1
- Stabilization PR
Unresolved Questions
#![feature(core_io_borrowed_buf)]changes before stabilization?#![feature(read_buf)]changes before stabilization?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing implementation PR #140459 and the public APIs in std::os::unix::fs::FileExt and std::os::windows::fs::FileExt, then read the linked read_buf and core_io_borrowed_buf tracking issues. Resolve the listed pre-stabilization questions and complete the FCP and stabilization steps; done means the feature is ready for a stabilization PR.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- api, operating-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100