Skip to content

Commit 740614b

Browse files
authored
feat(util): add BodyExt::into_stream (#115)
1 parent cc87586 commit 740614b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

http-body-util/src/lib.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,14 @@ pub trait BodyExt: http_body::Body {
136136
combinators::WithTrailers::new(self, trailers)
137137
}
138138

139+
/// Turn this body into [`BodyStream`].
140+
fn into_stream(self) -> BodyStream<Self>
141+
where
142+
Self: Sized,
143+
{
144+
BodyStream::new(self)
145+
}
146+
139147
/// Turn this body into [`BodyDataStream`].
140148
fn into_data_stream(self) -> BodyDataStream<Self>
141149
where

0 commit comments

Comments
 (0)