Skip to main content

Module frames

Module frames 

Source
Expand description

HTTP/2 frame model + codec (RFC 7540 §6) — the Rust port of frames/types.ts and frames/codec.ts. A Frame is a tagged enum; serialize_frame writes the 9-byte header + payload, and FrameDecoder streams complete frames out of arbitrary byte chunks, skipping unknown frame types (RFC 7540 §4.1).

Modules§

frame_type
Frame type identifiers (RFC 7540 §6).

Structs§

FrameDecoder
Streaming frame decoder. Feed it arbitrary byte chunks; it returns whatever complete frames are now available, buffering any partial frame internally.
Priority
Stream priority (RFC 7540 §6.3). weight is the human value 1..=256.
Settings
SETTINGS parameters (RFC 7540 §6.5.2). Absent fields are None.

Enums§

Frame
An HTTP/2 frame. SETTINGS/PING/GOAWAY always carry stream id 0, so it is implicit.

Constants§

DEFAULT_MAX_FRAME_SIZE
FRAME_HEADER_SIZE

Functions§

serialize_frame
Serialize a frame to bytes (9-byte header + payload).