-
Notifications
You must be signed in to change notification settings - Fork 51
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
Could BufStream
be flattened?
#111
Comments
If I have a buffer and need to provide two slices into it, (say, chunked decoding found a chunked header in the middle), being able to yield the buffer directly as an Additionally, |
@seanmonstar Yeah, I was imagining using something like cc @cramertj as well |
In hyper 0.11, it was just a |
@seanmonstar are there discussions where I can read up about this? Would love to know more! |
There's not much, but I found hyperium/hyper#1508 |
We cannot assume If the Also, either way there is a trait bound, so I don't see the win. If you want to continue this discussion, we can move to the |
As currently defined,
BufStream
produces a stream ofBuf
values, which in turn may contain multiple[u8]
slices. I was curious what the tradeoffs were around, instead, havingBufStream
yieldAsRef<[u8]>
directly, thus "flattening" these two layers. I'm pretty sure there are straightforward ways to translate in either direction, but I may be missing something.The text was updated successfully, but these errors were encountered: