Skip to main content

QpackDecoderState

Struct QpackDecoderState 

Source
pub struct QpackDecoderState { /* private fields */ }
Expand description

Caller-owned QPACK decoder feedback accounting.

This tracks the decoder-side Known Received Count already reported or implied to the peer encoder. It owns no output queue, stream lifecycle state, blocked payloads, transport buffering, or field decoding.

Implementations§

Source§

impl QpackDecoderState

Source

pub const fn new() -> Self

Creates decoder feedback accounting with no reported received inserts.

Source

pub const fn known_received_count(&self) -> u64

Returns the number of received inserts already reported or implied to the encoder.

Source

pub fn acknowledge_field_section<'a>( &mut self, destination: &'a mut [u8], stream_id: u64, section: QpackDecodedFieldSection<'_>, ) -> Result<Option<QpackSectionAcknowledgment<'a>>, QpackDecoderFeedbackError>

Builds a Section Acknowledgment for a successfully decoded dynamic field section.

Acknowledgments are coupled to decoded dynamic-table references rather than a caller-supplied count. A section with no dynamic references needs no acknowledgment, even when its resolved Required Insert Count is nonzero. On success, callers must retain and publish the returned bytes in invocation order because the acknowledgment advances local accounting.

Source

pub fn cancel_stream<'a>( &mut self, destination: &'a mut [u8], stream_id: u64, ) -> Result<QpackStreamCancellation<'a>, QpackDecoderFeedbackError>

Builds a Stream Cancellation for the supplied stream lifecycle event.

Stream tracking is caller and HTTP/3 lifecycle responsibility; this emits the supplied event without changing the Known Received Count.

Source

pub fn emit_insert_count_increment<'a>( &mut self, destination: &'a mut [u8], decoder_insert_count: u64, ) -> Result<Option<QpackInsertCountIncrement<'a>>, QpackDecoderFeedbackError>

Coalesces and builds one Insert Count Increment for received encoder inserts.

RFC 9204 lets the decoder choose increment timing. At most QPACK_INTEGER_MAX pending inserts are emitted at once; callers can invoke this again for a larger pending delta. Successful output advances local accounting, so its returned bytes must be retained and published in invocation order.

Trait Implementations§

Source§

impl Clone for QpackDecoderState

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for QpackDecoderState

Source§

impl Debug for QpackDecoderState

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for QpackDecoderState

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Eq for QpackDecoderState

Source§

impl PartialEq for QpackDecoderState

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for QpackDecoderState

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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.