pub struct HpackDecoder { /* private fields */ }Expand description
HPACK decoder: owns the dynamic table across header blocks.
Implementations§
Source§impl HpackDecoder
impl HpackDecoder
Sourcepub fn new(max_table_size: u32) -> Self
pub fn new(max_table_size: u32) -> Self
New decoder with max_table_size as both the protocol maximum
and the current table size.
Sourcepub fn set_max_table_size(&mut self, size: u32)
pub fn set_max_table_size(&mut self, size: u32)
Applies a peer SETTINGS_HEADER_TABLE_SIZE update (their new max
for blocks WE send — kept for symmetry; our encoder has no table).
Size updates in header blocks must not exceed the protocol max.
Sourcepub fn decode(&mut self, buf: &[u8]) -> Result<Vec<Header>, HpackError>
pub fn decode(&mut self, buf: &[u8]) -> Result<Vec<Header>, HpackError>
Decodes one complete header block into headers.
§Errors
HpackError on any malformed input (never panics on arbitrary
bytes).
Auto Trait Implementations§
impl Freeze for HpackDecoder
impl RefUnwindSafe for HpackDecoder
impl Send for HpackDecoder
impl Sync for HpackDecoder
impl Unpin for HpackDecoder
impl UnsafeUnpin for HpackDecoder
impl UnwindSafe for HpackDecoder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more