Module frame
Available on crate features
http-backend and http and std only.Expand description
A bounded, incremental HTTP/3 frame decoder (RFC 9114 §7.1).
Bytes are fed in arbitrary chunks; complete frames come out one at a time, with a “need more”
signal in between. It distinguishes incomplete input (need more), malformed input (a protocol
error) and a truncated end of stream (via FrameDecoder::is_at_frame_boundary).
Memory is bounded: DATA payloads are streamed rather than buffered, unknown and reserved frame payloads are skipped without allocating their advertised length, and every buffered (known) frame is rejected before buffering if it exceeds the configured cap. Frame type and length are read with a fragmentation-safe variable-length integer decoder, so a length split across chunks never loses framing.
Structs§
- Frame
Decoder - A bounded, incremental HTTP/3 frame decoder.
Enums§
- Frame
Error - An error decoding an HTTP/3 frame.
- Frame
Event - An event produced by
FrameDecoder::poll.
Constants§
- DEFAULT_
MAX_ FRAME_ SIZE - The default cap on a single buffered (non-DATA) frame’s payload.