pub struct Decoder { /* private fields */ }Expand description
HPACK decoder for decoding headers.
Implementations§
Source§impl Decoder
impl Decoder
Sourcepub fn with_max_size(max_size: usize) -> Self
pub fn with_max_size(max_size: usize) -> Self
Create a decoder with specified max table size.
Sourcepub fn set_max_header_list_size(&mut self, size: usize)
pub fn set_max_header_list_size(&mut self, size: usize)
Set the maximum header list size.
Sourcepub fn set_allowed_table_size(&mut self, size: usize)
pub fn set_allowed_table_size(&mut self, size: usize)
Set the allowed table size (from SETTINGS frame). This limits what the peer can request via dynamic table size updates.
Sourcepub fn decode(&mut self, src: &mut Bytes) -> Result<Vec<Header>, H2Error>
pub fn decode(&mut self, src: &mut Bytes) -> Result<Vec<Header>, H2Error>
Decode headers from a buffer.
Per RFC 7541 §4.2, dynamic table size updates are only permitted at the beginning of the header block (before the first header field representation). Any size update after a header field representation is a COMPRESSION_ERROR.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Decoder
impl RefUnwindSafe for Decoder
impl Send for Decoder
impl Sync for Decoder
impl Unpin for Decoder
impl UnsafeUnpin for Decoder
impl UnwindSafe for Decoder
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).