support async gzip decoding

This commit is contained in:
Ashley Mannix
2017-08-18 19:43:06 +10:00
parent aee559bdea
commit e2fa97254e
10 changed files with 605 additions and 203 deletions

View File

@@ -121,6 +121,20 @@ pub fn take(body: &mut Body) -> Body {
}
}
#[inline]
pub fn empty() -> Body {
Body {
inner: Inner::Hyper(::hyper::Body::empty()),
}
}
#[inline]
pub fn chunk(chunk: Bytes) -> Chunk {
Chunk {
inner: ::hyper::Chunk::from(chunk)
}
}
#[inline]
pub fn reusable(chunk: Bytes) -> Body {
Body {