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 BodyStream. #91

Merged
merged 1 commit into from
Aug 9, 2023
Merged

Add BodyStream. #91

merged 1 commit into from
Aug 9, 2023

Conversation

nitsky
Copy link
Contributor

@nitsky nitsky commented Mar 25, 2023

This PR adds a BodyStream type to create a Stream from a Body. This is useful when you want to stream data from a Body to code that accepts a Stream.

@mzr
Copy link

mzr commented Jun 5, 2023

+1 on this. Very useful to integrate with Gotham that requires hyper::body::Body in a response. In order to get that from impl http_body::Body, a call to hyper::body::Body::wrap_stream(s: Stream) is required. A compatibility that converts impl http_body::Body to a T: Stream seems very useful!

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.

Makes sense to me. Thanks!

@seanmonstar seanmonstar merged commit 63b67ae into hyperium:master Aug 9, 2023
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.

4 participants