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
{{ message }}
Repository navigation
ACP: Positioned reads into uninitialized buffers (FileExt::read_buf_at, ...) #581
ACP-acceptedAPI Change Proposal is accepted (seconded with no objections)api-change-proposalA proposal to add or alter unstable APIs in the standard libraries
Positioned reads from fast storage or even in-memory files, avoiding memory maps for more control over error handling.
Solution sketch
RFC 2930 outlines a solution to this same problem for normal unpositioned reads, introducing BorrowedCursor<'_>, an API for buffers to be incrementally filled and initialized.
Alternative APIs for handling uninitialized buffers have been (and are still being) considered under the unstableread_buf and core_io_borrowed_buf features. However, in any case, positioned reads should likely use the same solution for consistency.
changed the title [-]ACP: Support positioned reads into uninitialzed buffers (`FileExt::read_buf_at`, ...)[/-][+]ACP: Positioned reads into uninitialzed buffers (`FileExt::read_buf_at`, ...)[/+]on May 1, 2025
changed the title [-]ACP: Positioned reads into uninitialzed buffers (`FileExt::read_buf_at`, ...)[/-][+]ACP: Positioned reads into uninitialized buffers (`FileExt::read_buf_at`, ...)[/+]on May 1, 2025
We discussed this in the @rust-lang/libs-api meeting and are happy to accept it.
Please open a tracking issue and open a PR to rust-lang/rust to add it as an unstable feature. You can close this ACP once the tracking issue has been created.
ACP-acceptedAPI Change Proposal is accepted (seconded with no objections)api-change-proposalA proposal to add or alter unstable APIs in the standard libraries
Activity
[-]ACP: Support positioned reads into uninitialzed buffers (`FileExt::read_buf_at`, ...)[/-][+]ACP: Positioned reads into uninitialzed buffers (`FileExt::read_buf_at`, ...)[/+][-]ACP: Positioned reads into uninitialzed buffers (`FileExt::read_buf_at`, ...)[/-][+]ACP: Positioned reads into uninitialized buffers (`FileExt::read_buf_at`, ...)[/+]Amanieu commentedon May 6, 2025
We discussed this in the @rust-lang/libs-api meeting and are happy to accept it.
Please open a tracking issue and open a PR to rust-lang/rust to add it as an unstable feature. You can close this ACP once the tracking issue has been created.
niklasf commentedon May 7, 2025
Thanks! Tracking issue: rust-lang/rust#140771