pub struct QpackBlockedStreams<'storage> { /* private fields */ }Expand description
Caller-owned accounting for streams with unresolved QPACK field sections.
maximum_blocked_streams is the local decoder’s advertised
SETTINGS_QPACK_BLOCKED_STREAMS value. Registering the same stream aggregates the
greatest Required Insert Count across its started unresolved sections. Ready records
remain registered until explicitly removed. The caller and HTTP/3 own encoded bytes
and stream lifecycle; remove a record after a successful represented retry or when
its stream is abandoned or reset.
Implementations§
Source§impl<'storage> QpackBlockedStreams<'storage>
impl<'storage> QpackBlockedStreams<'storage>
Sourcepub fn new(
records: &'storage mut [QpackBlockedStream],
maximum_blocked_streams: u64,
) -> Result<Self, QpackBlockedStreamsError>
pub fn new( records: &'storage mut [QpackBlockedStream], maximum_blocked_streams: u64, ) -> Result<Self, QpackBlockedStreamsError>
Creates empty accounting backed by caller-supplied records.
On failure, the supplied records are unchanged. On success, every supplied
record is initialized to QpackBlockedStream::EMPTY.
Sourcepub const fn maximum_blocked_streams(&self) -> u64
pub const fn maximum_blocked_streams(&self) -> u64
Returns the local decoder’s advertised SETTINGS_QPACK_BLOCKED_STREAMS value.
Sourcepub const fn storage_capacity(&self) -> usize
pub const fn storage_capacity(&self) -> usize
Returns the number of caller-supplied physical record slots.
Sourcepub fn contains(&self, stream_id: u64) -> bool
pub fn contains(&self, stream_id: u64) -> bool
Returns whether a stream has a registered unresolved field section.
Sourcepub fn is_blocked(&self, stream_id: u64, insert_count: u64) -> bool
pub fn is_blocked(&self, stream_id: u64, insert_count: u64) -> bool
Returns whether a registered stream still awaits insertions at insert_count.
Sourcepub fn register(
&mut self,
stream_id: u64,
blocked: QpackFieldSectionBlocked,
) -> Result<(), QpackBlockedStreamsError>
pub fn register( &mut self, stream_id: u64, blocked: QpackFieldSectionBlocked, ) -> Result<(), QpackBlockedStreamsError>
Registers a blocked field section for a stream.
Re-registering a stream preserves the greatest Required Insert Count across its started unresolved sections.
Sourcepub fn remove(&mut self, stream_id: u64) -> bool
pub fn remove(&mut self, stream_id: u64) -> bool
Removes a stream’s accounting record, returning whether it was registered.
Sourcepub fn ready(&self, insert_count: u64) -> QpackReadyBlockedStreamIter<'_> ⓘ
pub fn ready(&self, insert_count: u64) -> QpackReadyBlockedStreamIter<'_> ⓘ
Iterates registered records ready to retry at insert_count.