Skip to content

Tracking Issue for read_buf_at #140771

Open
Open
@niklasf

Description

@niklasf

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

Unresolved Questions

Footnotes

  1. https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-ioArea: `std::io`, `std::fs`, `std::net` and `std::path`C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCS-tracking-unimplementedStatus: The feature has not been implemented.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions