pub struct HpackDecoderContext<'storage, 'entries> { /* private fields */ }Expand description
Connection-owned HPACK decoder state for one HTTP/2 direction.
Implementations§
Source§impl<'storage, 'entries> HpackDecoderContext<'storage, 'entries>
impl<'storage, 'entries> HpackDecoderContext<'storage, 'entries>
Sourcepub fn new(
table: HpackDynamicTable<'storage, 'entries>,
allowed_maximum_size: usize,
) -> Result<Self, HpackDecodeError>
pub fn new( table: HpackDynamicTable<'storage, 'entries>, allowed_maximum_size: usize, ) -> Result<Self, HpackDecodeError>
Creates a decoder context from caller-owned dynamic-table storage.
Sourcepub const fn allowed_maximum_size(&self) -> usize
pub const fn allowed_maximum_size(&self) -> usize
Returns the effective protocol maximum currently allowed for this direction.
Sourcepub const fn dynamic_table(&self) -> &HpackDynamicTable<'storage, 'entries>
pub const fn dynamic_table(&self) -> &HpackDynamicTable<'storage, 'entries>
Returns the dynamic table without permitting policy-desynchronizing mutation.
Sourcepub const fn next_required_size_update(&self) -> Option<usize>
pub const fn next_required_size_update(&self) -> Option<usize>
Returns the exact next required leading size update, if any.
Sourcepub fn set_allowed_maximum_size(
&mut self,
allowed: usize,
) -> Result<(), HpackDecodeError>
pub fn set_allowed_maximum_size( &mut self, allowed: usize, ) -> Result<(), HpackDecodeError>
Applies an effective HTTP/2 table-size policy change for this direction.
Sourcepub fn decode_block<'block>(
&mut self,
block: &'block [u8],
) -> HpackBlockDecoder<'block, '_, 'storage, 'entries>
pub fn decode_block<'block>( &mut self, block: &'block [u8], ) -> HpackBlockDecoder<'block, '_, 'storage, 'entries>
Decodes one complete HPACK header block.
Sourcepub fn into_dynamic_table(self) -> HpackDynamicTable<'storage, 'entries>
pub fn into_dynamic_table(self) -> HpackDynamicTable<'storage, 'entries>
Recovers the caller-owned dynamic table.
Auto Trait Implementations§
impl<'storage, 'entries> !UnwindSafe for HpackDecoderContext<'storage, 'entries>
impl<'storage, 'entries> Freeze for HpackDecoderContext<'storage, 'entries>
impl<'storage, 'entries> RefUnwindSafe for HpackDecoderContext<'storage, 'entries>
impl<'storage, 'entries> Send for HpackDecoderContext<'storage, 'entries>
impl<'storage, 'entries> Sync for HpackDecoderContext<'storage, 'entries>
impl<'storage, 'entries> Unpin for HpackDecoderContext<'storage, 'entries>
impl<'storage, 'entries> UnsafeUnpin for HpackDecoderContext<'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