Skip to content

Tracking Issue for bufreader_peek #128405

Open

Description

Feature gate: #![feature(bufreader_peek)]

This is a tracking issue for the BufReader::peek method.

Public API

// std::io

impl BufReader {
    fn peek(&mut self, n: usize) -> io::Result<&[u8]>
}

Steps / History

Unresolved Questions

  • what should happen if n > capacity? options are: short slice, error, or panic.
  • should the buffer be completely filled, or should it only read the number of bytes requested?

Footnotes

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

C-tracking-issueCategory: A tracking issue for an RFC or an unstable feature.F-bufreader_peek`#![feature(bufreader_peek)]`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