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 set_limit() fn to std::io::Take #27269

Closed
carllerche opened this issue Jul 24, 2015 · 2 comments
Closed

Add set_limit() fn to std::io::Take #27269

carllerche opened this issue Jul 24, 2015 · 2 comments
Labels
T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Comments

@carllerche
Copy link
Member

std::io::Cursor has a fn to update the position yet Take does not have a fn for setting the limit. Being able to update the limit is required for implementing various traits for Take. For example, Read works by updating the limit.

I was hoping to implement Buf for Take (in the bytes crate) but am currently unable to do so.

@carllerche
Copy link
Member Author

It would also be nice if Take implemented:

  • get_ref
  • get_mut
  • into_inner

@steveklabnik steveklabnik added T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. and removed A-libs labels Mar 24, 2017
@Mark-Simulacrum
Copy link
Member

This is only missing the set_limit function today, as the rest are implemented (tracked, in part, by #41519). I've filed #42697 to implement set_limit.

bors added a commit that referenced this issue Jul 12, 2017
Allow setting the limit on std::io::Take.

Fixes #27269.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants