Skip to main content

QpackBlockedStreams

Struct QpackBlockedStreams 

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

Source

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.

Source

pub const fn maximum_blocked_streams(&self) -> u64

Returns the local decoder’s advertised SETTINGS_QPACK_BLOCKED_STREAMS value.

Source

pub const fn storage_capacity(&self) -> usize

Returns the number of caller-supplied physical record slots.

Source

pub const fn len(&self) -> usize

Returns the number of distinct registered streams.

Source

pub const fn is_empty(&self) -> bool

Returns whether no streams are registered.

Source

pub fn contains(&self, stream_id: u64) -> bool

Returns whether a stream has a registered unresolved field section.

Source

pub fn is_blocked(&self, stream_id: u64, insert_count: u64) -> bool

Returns whether a registered stream still awaits insertions at insert_count.

Source

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.

Source

pub fn remove(&mut self, stream_id: u64) -> bool

Removes a stream’s accounting record, returning whether it was registered.

Source

pub fn ready(&self, insert_count: u64) -> QpackReadyBlockedStreamIter<'_> ⓘ

Iterates registered records ready to retry at insert_count.

Auto Trait Implementations§

§

impl<'storage> !UnwindSafe for QpackBlockedStreams<'storage>

§

impl<'storage> Freeze for QpackBlockedStreams<'storage>

§

impl<'storage> RefUnwindSafe for QpackBlockedStreams<'storage>

§

impl<'storage> Send for QpackBlockedStreams<'storage>

§

impl<'storage> Sync for QpackBlockedStreams<'storage>

§

impl<'storage> Unpin for QpackBlockedStreams<'storage>

§

impl<'storage> UnsafeUnpin for QpackBlockedStreams<'storage>

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.