-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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 the ability to safely read into ReadBuf #3509
Comments
Yea, I purposefully stuck with the smallest API possible, so that an overly eager method wouldn't restrict it's internal design. I'm happy to have proposals for new methods to add. You're specifically asking for a way to access the slice as |
Yes, that would be best. See my implementation where I have to use |
Closes hyperium#3509 Signed-off-by: John Nunley <[email protected]>
Is your feature request related to a problem? Please describe.
It is impossible to write an implementation of
hyper::rt::Read
becauseReadBufCursor
cannot be written to safely.Describe the solution you'd like
Have a method that initializes the read buffer by zeroing it and then returning an
&mut [u8]
that can be filled safely. E.g. this.Describe alternatives you've considered
N/A
The text was updated successfully, but these errors were encountered: