pub struct HpackDecoder {
pub dynamic_table: Vec<(String, String)>,
pub max_table_size: usize,
pub current_table_size: usize,
}Expand description
Stateful HPACK decoder maintaining dynamic table per RFC 7541.
Fields§
§dynamic_table: Vec<(String, String)>§max_table_size: usize§current_table_size: usizeImplementations§
Source§impl HpackDecoder
impl HpackDecoder
pub fn new() -> Self
Sourcepub fn get_header(&self, index: usize) -> Result<(String, String), FetchError>
pub fn get_header(&self, index: usize) -> Result<(String, String), FetchError>
Retrieves an entry by 1-based combined static and dynamic table index.
Sourcepub fn get_name(&self, index: usize) -> Result<String, FetchError>
pub fn get_name(&self, index: usize) -> Result<String, FetchError>
Retrieves a header name by 1-based combined index.
Sourcepub fn add_entry(&mut self, name: String, value: String)
pub fn add_entry(&mut self, name: String, value: String)
Adds a new header entry to the dynamic table with FIFO eviction per RFC 7541 Section 4.1.
Sourcepub fn decode_header_block(
&mut self,
block: &[u8],
) -> Result<Vec<(String, String)>, FetchError>
pub fn decode_header_block( &mut self, block: &[u8], ) -> Result<Vec<(String, String)>, FetchError>
Decodes an HPACK header block into key-value pairs.
Trait Implementations§
Source§impl Clone for HpackDecoder
impl Clone for HpackDecoder
Source§impl Debug for HpackDecoder
impl Debug for HpackDecoder
Auto Trait Implementations§
impl Forget for HpackDecoder
impl Freeze for HpackDecoder
impl Move 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