pub struct HpackEncoder { /* private fields */ }Expand description
HPACK encoder.
Currently uses literal header fields without indexing for simplicity. An optimized version would use the static and dynamic tables to produce smaller output.
Implementations§
Source§impl HpackEncoder
impl HpackEncoder
Sourcepub fn encode(&self, headers: &[(&str, &str)]) -> Vec<u8> ⓘ
pub fn encode(&self, headers: &[(&str, &str)]) -> Vec<u8> ⓘ
Encode a list of header name-value pairs using HPACK.
This implementation uses literal header fields without indexing (pattern 0000xxxx with index=0) for simplicity and correctness. It checks the static table for name-only matches to save space.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HpackEncoder
impl RefUnwindSafe for HpackEncoder
impl Send for HpackEncoder
impl Sync for HpackEncoder
impl Unpin for HpackEncoder
impl UnsafeUnpin for HpackEncoder
impl UnwindSafe for HpackEncoder
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