diff --git a/http-body-util/src/lib.rs b/http-body-util/src/lib.rs index b655e2a..1f7828f 100644 --- a/http-body-util/src/lib.rs +++ b/http-body-util/src/lib.rs @@ -128,6 +128,14 @@ pub trait BodyExt: http_body::Body { { combinators::WithTrailers::new(self, trailers) } + + /// Turn this body into [`BodyStream`]. + fn into_stream(self) -> BodyStream + where + Self: Sized, + { + BodyStream::new(self) + } } impl BodyExt for T where T: http_body::Body {}