add streaming body to requests and responses #3

Merged
lx merged 64 commits from stream-body into main 2022-09-13 10:56:54 +00:00
Showing only changes of commit a0dac87e3b - Show all commits

View file

@ -60,6 +60,10 @@ pub struct Req<M: Message> {
} }
impl<M: Message> Req<M> { impl<M: Message> Req<M> {
pub fn new(v: M) -> Result<Self, Error> {
Ok(v.into_req()?)
}
pub fn with_stream_from_buffer(self, b: Bytes) -> Self { pub fn with_stream_from_buffer(self, b: Bytes) -> Self {
Self { Self {
stream: AttachedStream::Fixed(b), stream: AttachedStream::Fixed(b),