wip: refactor, compiles

This commit is contained in:
Oliver Gould
2017-07-20 14:51:27 +00:00
parent 0d84c98c89
commit a62d3dda54
17 changed files with 1395 additions and 1052 deletions

View File

@@ -80,6 +80,21 @@ impl<T> Frame<T> {
&Settings(_) => StreamId::zero(),
}
}
pub fn is_end_stream(&self) -> bool {
use self::Frame::*;
match self {
&Headers(ref v) => v.is_end_stream(),
&Data(ref v) => v.is_end_stream(),
&Reset(ref v) => true,
&PushPromise(_) |
&WindowUpdate(_) |
&Ping(_) |
&Settings(_) => false,
}
}
}
/// Errors that can occur during parsing an HTTP/2 frame.