Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Tracking Issue for BufRead::has_data_left #86423

Copy link
Copy link

Description

@YuhanLiin
Issue body actions

Feature gate: #![feature(buf_read_has_data_left)]

This is a tracking issue for adding has_data_left to BufRead. Its purpose is to determine whether a reader has any data left over to read.

Example

let file = File::open("foo.txt")?;
let reader = BufReader::new(file);
let is_not_empty = reader.has_data_left()?;

Steps / History

Unresolved Questions

  • Still need to finalize the name of has_data_left and whether the API should check the positive case or the negative case.
  • Internals discussion (note that the post uses is_at_eof as the name of the new method).
Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-ioArea: `std::io`, `std::fs`, `std::net` and `std::path`Area: `std::io`, `std::fs`, `std::net` and `std::path`C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant 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

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.