Skip to content
This repository has been archived by the owner on May 6, 2018. It is now read-only.

add read_at_least function? #68

Closed
cssivision opened this issue Sep 2, 2017 · 5 comments
Closed

add read_at_least function? #68

cssivision opened this issue Sep 2, 2017 · 5 comments

Comments

@cssivision
Copy link

read_at_least is similar to read_exact but read at least min bytes. reads from reader into buf until it has read at least min bytes. It returns the number of bytes copied success , when n >= min.

@alexcrichton
Copy link
Contributor

Currently the functions here match the standard library's Read trait, but this doesn't exist on the Read trait?

@cssivision
Copy link
Author

yes, it's a helper function. this function is convenient in some situation.

@alexcrichton
Copy link
Contributor

My question would basically be why it's justified to go into tokio-io when it was decided to not place it into the standard library. IIRC there was a lot of discussion about this on rust-lang/rfcs#980

@cssivision
Copy link
Author

thanks @alexcrichton, it spent me some time reading the whole discussion which inspired me a lot.

@carllerche
Copy link
Member

It seems like the take away is "do nothing". As such, I will close this issue. Please let me know if this is not correct.

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

No branches or pull requests

3 participants