Skip to main content

net_wire/http3/enums/
stream.rs

1//! Shared HTTP/3 stream vocabulary.
2
3use super::super::codepoints::Http3StreamType;
4use super::super::ids::Http3PushId;
5
6/// The local endpoint role used to interpret control-stream frame semantics.
7#[derive(Clone, Copy, Debug, Eq, PartialEq)]
8pub enum Http3EndpointRole {
9    /// The local endpoint is an HTTP/3 client.
10    Client,
11    /// The local endpoint is an HTTP/3 server.
12    Server,
13}
14
15/// Classifies an HTTP/3 unidirectional stream header without discarding extension types.
16#[derive(Clone, Copy, Debug, Eq, PartialEq)]
17pub enum Http3UniStreamKind {
18    /// The HTTP/3 control stream.
19    Control,
20    /// A server push stream and its Push ID.
21    Push(Http3PushId),
22    /// The QPACK encoder stream.
23    QpackEncoder,
24    /// The QPACK decoder stream.
25    QpackDecoder,
26    /// An extension, unknown, or grease stream type.
27    Unknown(Http3StreamType),
28}