Wire in trailers (#34)

Add send and receive trailer support.
This commit is contained in:
Carl Lerche
2017-08-25 10:20:47 -07:00
committed by GitHub
parent c0433e8831
commit 11d5f95236
12 changed files with 365 additions and 25 deletions

View File

@@ -61,6 +61,13 @@ impl<B: IntoBuf> Body<B> {
pub fn release_capacity(&mut self, sz: usize) -> Result<(), ConnectionError> {
self.inner.release_capacity(sz as proto::WindowSize)
}
/// Poll trailers
///
/// This function **must** not be called until `Body::poll` returns `None`.
pub fn poll_trailers(&mut self) -> Poll<Option<HeaderMap>, ConnectionError> {
self.inner.poll_trailers()
}
}
impl<B: IntoBuf> futures::Stream for Body<B> {