Skip to content

Tracking Issue for bufreader_peek #128405

Open
@lolbinarycat

Description

@lolbinarycat

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

Metadata

Metadata

Assignees

Labels

C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCF-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