pub struct Http3PeerUniStreamState { /* private fields */ }Expand description
Bounded state for incoming peer HTTP/3 unidirectional critical streams.
It records only the three unique critical stream IDs. Header parsing, stream I/O and reassembly, critical-stream frame sequencing, QPACK application, push lifecycle, locally opened streams, and extension policy remain owned by their respective callers.
Implementations§
Source§impl Http3PeerUniStreamState
impl Http3PeerUniStreamState
Sourcepub const fn new(local_role: Http3EndpointRole) -> Self
pub const fn new(local_role: Http3EndpointRole) -> Self
Creates empty incoming peer unidirectional-stream state for an endpoint role.
Sourcepub const fn role(self) -> Http3EndpointRole
pub const fn role(self) -> Http3EndpointRole
Returns the local endpoint role used to validate peer stream identifiers.
Sourcepub const fn control_stream_id(self) -> Option<Http3StreamId>
pub const fn control_stream_id(self) -> Option<Http3StreamId>
Returns the registered peer control stream identifier.
Sourcepub const fn qpack_encoder_stream_id(self) -> Option<Http3StreamId>
pub const fn qpack_encoder_stream_id(self) -> Option<Http3StreamId>
Returns the registered peer QPACK encoder stream identifier.
Sourcepub const fn qpack_decoder_stream_id(self) -> Option<Http3StreamId>
pub const fn qpack_decoder_stream_id(self) -> Option<Http3StreamId>
Returns the registered peer QPACK decoder stream identifier.
Sourcepub fn receive_header(
&mut self,
stream_id: Http3StreamId,
header: Http3UniStreamHeader<'_>,
) -> Result<Http3PeerUniStreamEvent, Http3PeerUniStreamError>
pub fn receive_header( &mut self, stream_id: Http3StreamId, header: Http3UniStreamHeader<'_>, ) -> Result<Http3PeerUniStreamEvent, Http3PeerUniStreamError>
Receives a parsed HTTP/3 unidirectional stream header from a peer stream.
Errors leave state unchanged. A successful critical event registers exactly its matching critical stream; push and unknown streams are deliberately not retained.
Sourcepub fn receive_closed(
self,
stream_id: Http3StreamId,
) -> Result<(), Http3PeerUniStreamError>
pub fn receive_closed( self, stream_id: Http3StreamId, ) -> Result<(), Http3PeerUniStreamError>
Reports a close or reset of a retained peer critical stream.
Closing a critical stream is terminal for the connection, so this method intentionally
takes self and does not perform a recoverable state transition. Closing an unregistered,
push, or extension stream is ignored, including a close received before its header.