pub struct Encoder {
table: Table,
size_update: Option<SizeUpdate>,
}
Fields§
§table: Table
§size_update: Option<SizeUpdate>
Implementations§
source§impl Encoder
impl Encoder
pub fn new(max_size: usize, capacity: usize) -> Encoder
sourcepub fn update_max_size(&mut self, val: usize)
pub fn update_max_size(&mut self, val: usize)
Queues a max size update.
The next call to encode
will include a dynamic size update frame.
sourcepub fn encode<I>(&mut self, headers: I, dst: &mut BytesMut)where
I: IntoIterator<Item = Header<Option<HeaderName>>>,
pub fn encode<I>(&mut self, headers: I, dst: &mut BytesMut)where I: IntoIterator<Item = Header<Option<HeaderName>>>,
Encode a set of headers into the provide buffer
fn encode_size_updates(&mut self, dst: &mut BytesMut)
fn encode_header(&mut self, index: &Index, dst: &mut BytesMut)
fn encode_header_without_name( &mut self, last: &Index, value: &HeaderValue, dst: &mut BytesMut )
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Encoder
impl Send for Encoder
impl Sync for Encoder
impl Unpin 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