-
Notifications
You must be signed in to change notification settings - Fork 20
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
FromByteStream quite limited because only ByteRead functions can be used #14
Comments
The trouble with But I've pushed out a new 1.9 version with Having a peekable reader that also implements reader methods would be a good idea, but I'll have to think of the best way to implement it. |
Those don't have to be boxed. You can just return a |
I'd suggest yanking 1.9.0 fast and making this change (without |
See #15 |
Many thanks @tuffy ! |
Apologies if this is a bit all over the place, but just wanted to quickly drop off a note on some issues I ran into whilst trying to use
FromByteStream
.The following things I sometimes need when parsing certain types of data (from a slice of bytes):
When using
ByteReader
directly that's no problem, since we can get access to underlying reader.However, inside a
FromByteStream
implementation we only have theByteRead
trait to play with, which is very limited.I wonder whether it would make sense to define
ByteRead
aspub trait ByteRead: Read
?In addition it would also be nice to be able to
peek
without consuming the data, but I guess that's independent.cc @sdroege
The text was updated successfully, but these errors were encountered: