pub enum Frame {
Data(Bytes),
Headers(Bytes),
Settings(Settings),
CancelPush(u64),
PushPromise {
push_id: u64,
field_section: Bytes,
},
Goaway(u64),
MaxPushId(u64),
}h3 only.Expand description
An HTTP/3 frame (RFC 9114 Section 7.2).
Data and Headers payloads are opaque byte ranges. Data is the
streamed body chunk (the driver may hand it to the body reader
without copying); Headers and PushPromise field sections are
QPACK-encoded and decoded by the driver.
Variants§
Data(Bytes)
DATA: a chunk of the request or response body.
Headers(Bytes)
HEADERS: the QPACK-encoded field section.
Settings(Settings)
SETTINGS: connection parameters (first frame of a control
stream).
CancelPush(u64)
CANCEL_PUSH: push ID whose push the peer should abandon.
PushPromise
PUSH_PROMISE: push ID plus the promised request’s QPACK-encoded
field section.
Goaway(u64)
GOAWAY: the highest stream ID (server) or push ID (client) the
sender will process.
MaxPushId(u64)
MAX_PUSH_ID: the highest push ID the server may use.
Implementations§
Source§impl Frame
impl Frame
Sourcepub fn is_known(&self) -> bool
pub fn is_known(&self) -> bool
Whether this is one of the known HTTP/3 frame types (RFC 9114 Section 7.2).
The decoder never surfaces unknown or reserved (grease) frame types — they are consumed and skipped (Section 7.2.8) — so every frame it returns is by construction a known type. This method documents the request-stream rule (Section 4.1) that after the trailers only unknown frames may still appear.