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

util: Add a Collected body and combinator #70

Merged
merged 5 commits into from
Oct 19, 2022
Merged

Conversation

LucioFranco
Copy link
Member

@LucioFranco LucioFranco commented Oct 14, 2022

  • Add a new Collected body that buffers all DATA frames and the trailers and provides ways to convert those DATA frames into Bytes and impl Buf. These replace hyper's aggregate/to_bytes free fns.
  • Add a new BodyExt::colect combinator to create a buffered body from another impl Body.

Related to hyperium/hyper#3010

@LucioFranco LucioFranco changed the title util: Add a Buffered body and combinator util: Add a Collected body and combinator Oct 17, 2022
Copy link
Member

@seanmonstar seanmonstar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great to me! Wouldn't mind @davidpdrsn looking once more.

http-body-util/src/collected.rs Outdated Show resolved Hide resolved
Copy link
Member

@davidpdrsn davidpdrsn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@LucioFranco LucioFranco merged commit 26a9bee into master Oct 19, 2022
@LucioFranco LucioFranco deleted the lucio/buffered branch October 19, 2022 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants