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
impl QpackDecoderState
Sourcepub const fn new() -> Self
pub const fn new() -> Self
Creates decoder feedback accounting with no reported received inserts.
Sourcepub const fn known_received_count(&self) -> u64
pub const fn known_received_count(&self) -> u64
Returns the number of received inserts already reported or implied to the encoder.
Sourcepub fn acknowledge_field_section<'a>(
&mut self,
destination: &'a mut [u8],
stream_id: u64,
section: QpackDecodedFieldSection<'_>,
) -> Result<Option<QpackSectionAcknowledgment<'a>>, QpackDecoderFeedbackError>
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.
Sourcepub fn cancel_stream<'a>(
&mut self,
destination: &'a mut [u8],
stream_id: u64,
) -> Result<QpackStreamCancellation<'a>, QpackDecoderFeedbackError>
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.
Sourcepub fn emit_insert_count_increment<'a>(
&mut self,
destination: &'a mut [u8],
decoder_insert_count: u64,
) -> Result<Option<QpackInsertCountIncrement<'a>>, QpackDecoderFeedbackError>
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.