pub struct HpackBlockEncoder<'table, 'storage, 'entries> { /* private fields */ }Expand description
An encoder for one HPACK block borrowing connection-owned dynamic-table state.
Implementations§
Source§impl<'table, 'storage, 'entries> HpackBlockEncoder<'table, 'storage, 'entries>
impl<'table, 'storage, 'entries> HpackBlockEncoder<'table, 'storage, 'entries>
Sourcepub const fn requires_size_update(&self) -> bool
pub const fn requires_size_update(&self) -> bool
Returns whether a leading dynamic-table size update must precede a field.
Sourcepub const fn has_emitted_field(&self) -> bool
pub const fn has_emitted_field(&self) -> bool
Returns whether this block has emitted a header-field representation.
Sourcepub fn encode_indexed<'destination>(
&mut self,
destination: &'destination mut [u8],
index: u64,
) -> Result<&'destination [u8], HpackEncodeError>
pub fn encode_indexed<'destination>( &mut self, destination: &'destination mut [u8], index: u64, ) -> Result<&'destination [u8], HpackEncodeError>
Encodes one currently resolvable combined static/dynamic table index.
Sourcepub fn encode_literal<'destination>(
&mut self,
destination: &'destination mut [u8],
mode: HpackLiteralMode,
name: HpackEncodeLiteralName<'_>,
value: &[u8],
) -> Result<&'destination [u8], HpackEncodeError>
pub fn encode_literal<'destination>( &mut self, destination: &'destination mut [u8], mode: HpackLiteralMode, name: HpackEncodeLiteralName<'_>, value: &[u8], ) -> Result<&'destination [u8], HpackEncodeError>
Encodes one plain literal field and inserts it only for incremental indexing.
Inputs are decoded opaque bytes. This convenience method always emits non-Huffman strings.
Sourcepub fn encode_literal_with_huffman<'destination>(
&mut self,
destination: &'destination mut [u8],
mode: HpackLiteralMode,
name: HpackEncodeLiteralName<'_>,
value: &[u8],
strategy: HpackLiteralHuffman,
) -> Result<&'destination [u8], HpackEncodeError>
pub fn encode_literal_with_huffman<'destination>( &mut self, destination: &'destination mut [u8], mode: HpackLiteralMode, name: HpackEncodeLiteralName<'_>, value: &[u8], strategy: HpackLiteralHuffman, ) -> Result<&'destination [u8], HpackEncodeError>
Encodes one literal field with explicit Huffman choices for emitted strings.
Inputs and any incremental-indexing table entry remain decoded opaque bytes.
Sourcepub fn encode_dynamic_table_size_update<'destination>(
&mut self,
destination: &'destination mut [u8],
maximum_size: usize,
) -> Result<&'destination [u8], HpackEncodeError>
pub fn encode_dynamic_table_size_update<'destination>( &mut self, destination: &'destination mut [u8], maximum_size: usize, ) -> Result<&'destination [u8], HpackEncodeError>
Encodes and applies one leading RFC dynamic-table maximum update.
Sourcepub fn finish(self) -> Result<(), HpackEncodeError>
pub fn finish(self) -> Result<(), HpackEncodeError>
Establishes successful semantic completion of this HPACK block.
Auto Trait Implementations§
impl<'table, 'storage, 'entries> !UnwindSafe for HpackBlockEncoder<'table, 'storage, 'entries>
impl<'table, 'storage, 'entries> Freeze for HpackBlockEncoder<'table, 'storage, 'entries>
impl<'table, 'storage, 'entries> RefUnwindSafe for HpackBlockEncoder<'table, 'storage, 'entries>
impl<'table, 'storage, 'entries> Send for HpackBlockEncoder<'table, 'storage, 'entries>
impl<'table, 'storage, 'entries> Sync for HpackBlockEncoder<'table, 'storage, 'entries>
impl<'table, 'storage, 'entries> Unpin for HpackBlockEncoder<'table, 'storage, 'entries>
impl<'table, 'storage, 'entries> UnsafeUnpin for HpackBlockEncoder<'table, 'storage, 'entries>
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