Skip to main content

Module frame

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§

FrameDecoder
A bounded, incremental HTTP/3 frame decoder.

Enums§

FrameError
An error decoding an HTTP/3 frame.
FrameEvent
An event produced by FrameDecoder::poll.

Constants§

DEFAULT_MAX_FRAME_SIZE
The default cap on a single buffered (non-DATA) frame’s payload.