Skip to main content

HpackDecoderContext

Struct HpackDecoderContext 

Source
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>

Source

pub fn new( table: HpackDynamicTable<'storage, 'entries>, allowed_maximum_size: usize, ) -> Result<Self, HpackDecodeError>

Creates a decoder context from caller-owned dynamic-table storage.

Source

pub const fn allowed_maximum_size(&self) -> usize

Returns the effective protocol maximum currently allowed for this direction.

Source

pub const fn dynamic_table(&self) -> &HpackDynamicTable<'storage, 'entries>

Returns the dynamic table without permitting policy-desynchronizing mutation.

Source

pub const fn next_required_size_update(&self) -> Option<usize>

Returns the exact next required leading size update, if any.

Source

pub fn set_allowed_maximum_size( &mut self, allowed: usize, ) -> Result<(), HpackDecodeError>

Applies an effective HTTP/2 table-size policy change for this direction.

Source

pub fn decode_block<'block>( &mut self, block: &'block [u8], ) -> HpackBlockDecoder<'block, '_, 'storage, 'entries>

Decodes one complete HPACK header block.

Source

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.