Tracking Issue for read_buf_at (original) (raw)
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
- ACP: Positioned reads into uninitialized buffers (FileExt::read_buf_at, ...) libs-team#581
- Implementation: Add read_buf equivalents for positioned reads #140459
- Final comment period (FCP)1
- Stabilization PR
Unresolved Questions
- #![feature(core_io_borrowed_buf)] changes before stabilization?
- #![feature(read_buf)] changes before stabilization?