Skip to content

Commit 97afc4a

Browse files
committed
feat(util): add BodyExt::into_stream
1 parent 8d390ad commit 97afc4a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

http-body-util/src/lib.rs

+8
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,14 @@ pub trait BodyExt: http_body::Body {
129129
combinators::WithTrailers::new(self, trailers)
130130
}
131131

132+
/// Turn this body into [`BodyStream`].
133+
fn into_stream(self) -> BodyStream<Self>
134+
where
135+
Self: Sized,
136+
{
137+
BodyStream::new(self)
138+
}
139+
132140
/// Turn this body into [`BodyDataStream`].
133141
fn into_data_stream(self) -> BodyDataStream<Self>
134142
where

0 commit comments

Comments
 (0)