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

Unresolved Questions

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