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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more