implement h2::server::Stream::send_reset(Reason) and Body::is_empty() (#22)

This commit is contained in:
Oliver Gould
2017-08-23 12:48:00 -07:00
committed by Carl Lerche
parent e8f757457b
commit f839443ece
7 changed files with 87 additions and 3 deletions

View File

@@ -108,4 +108,13 @@ impl<B> Deque<B> {
None => None,
}
}
pub fn peek_front<'a>(&self, buf: &'a Buffer<B>) -> Option<&'a Frame<B>> {
match self.indices {
Some(idxs) => {
Some(&buf.slab[idxs.head].frame)
}
None => None,
}
}
}