pub struct Encoder { /* private fields */ }Expand description
An HPACK encoder: one per connection direction.
Implementations§
Source§impl Encoder
impl Encoder
Sourcepub fn new() -> Self
pub fn new() -> Self
An encoder whose table is DEFAULT_TABLE_SIZE, the size a decoder
starts with in HTTP/2.
Sourcepub fn with_table_size(size: u32) -> Self
pub fn with_table_size(size: u32) -> Self
An encoder whose table starts at size on both sides, as when the
size was agreed before the first block (RFC 7541 Appendix C.5). Sizes
above DEFAULT_TABLE_SIZE are capped to it.
Sourcepub fn set_huffman(&mut self, on: bool)
pub fn set_huffman(&mut self, on: bool)
Whether strings are Huffman-coded when that is shorter; on by default.
Sourcepub fn set_peer_max_table_size(&mut self, size: u32)
pub fn set_peer_max_table_size(&mut self, size: u32)
Follows the peer’s SETTINGS_HEADER_TABLE_SIZE. This encoder uses at
most DEFAULT_TABLE_SIZE; a change in what it uses is announced at
the start of the next block.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Encoder
impl Freeze for Encoder
impl Move for Encoder
impl RefUnwindSafe for Encoder
impl Send for Encoder
impl Sync for Encoder
impl Unpin for Encoder
impl UnsafeUnpin for Encoder
impl UnwindSafe for Encoder
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