-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
A-ioArea: `std::io`, `std::fs`, `std::net` and `std::path`Area: `std::io`, `std::fs`, `std::net` and `std::path`C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCS-tracking-unimplementedStatus: The feature has not been implemented.Status: The feature has not been implemented.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
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
- 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?
Footnotes
Metadata
Metadata
Assignees
Labels
A-ioArea: `std::io`, `std::fs`, `std::net` and `std::path`Area: `std::io`, `std::fs`, `std::net` and `std::path`C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCS-tracking-unimplementedStatus: The feature has not been implemented.Status: The feature has not been implemented.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.