Work on prioritization

This commit is contained in:
Carl Lerche
2017-08-11 21:57:44 -07:00
parent 3b2ad536d9
commit 570962353b
4 changed files with 125 additions and 56 deletions

View File

@@ -44,6 +44,14 @@ impl<T> Data<T> {
self.flags.is_end_stream()
}
pub fn set_end_stream(&mut self) {
self.flags.set_end_stream();
}
pub fn unset_end_stream(&mut self) {
self.flags.unset_end_stream();
}
pub fn head(&self) -> Head {
Head::new(Kind::Data, self.flags.into(), self.stream_id)
}
@@ -127,6 +135,10 @@ impl DataFlag {
self.0 |= END_STREAM
}
pub fn unset_end_stream(&mut self) {
self.0 &= !END_STREAM
}
pub fn is_padded(&self) -> bool {
self.0 & PADDED == PADDED
}