Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add read_full to std::io::ReadExt #23174

Closed
cskr opened this issue Mar 8, 2015 · 2 comments
Closed

Add read_full to std::io::ReadExt #23174

cskr opened this issue Mar 8, 2015 · 2 comments

Comments

@cskr
Copy link

cskr commented Mar 8, 2015

Since the read function of std::io::Read may read less than the length of the buffer passed to it, adding a function named read_full which calls read in a loop until the buffer is filled can be useful.

@mahkoh
Copy link
Contributor

mahkoh commented Mar 10, 2015

Needs an RFC. This was previously rejected because the EOF handling and the functions built on top of it were fucked up. This has been fixed so it might work now.

novalis added a commit to novalis/rust that referenced this issue Mar 20, 2015
In the event of EOF, read_all returns a result with the new error
ShortRead(number of bytes successfully read).

Fixes rust-lang#23174
@steveklabnik
Copy link
Member

This

  1. went through the RFC process RFC for read_all rfcs#980
  2. was implemented, as read_exact Tracking issue for read_exact (RFC #980) #27585

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants