pub enum UniStreamResult<T> {
Handled,
WebTransport {
session_id: u64,
stream: T,
buffer: Buffer,
},
Unknown {
stream_type: u64,
stream: T,
},
}Expand description
The result of processing an HTTP/3 unidirectional stream.
Variants§
Handled
The stream was a known internal type (control, QPACK encoder/decoder) and was handled automatically.
WebTransport
A WebTransport unidirectional data stream. The session_id identifies the associated
WebTransport session.
Fields
stream: TThe receive stream, ready for application data.
buffer: BufferAny bytes buffered after the session ID during stream negotiation.
Unknown
A stream whose type is recognized but unsupported (e.g. Push) or not recognized
at all by this crate.
The caller is responsible for disposing of the stream — the in-tree consumers
(trillium-server-common for servers, trillium-client for clients) RST it with
H3_STREAM_CREATION_ERROR. process_inbound_uni deliberately does not close
the stream itself: handing it back gives a downstream extension the option to
implement a stream type trillium-http doesn’t yet know about (a future RFC, an
experiment, etc.) without forking the codec.