Skip to main content

Module capsule

Module capsule 

Available on crate features http and std only.
Expand description

Bounded, incremental Capsule Protocol decoding (RFC 9297 §3).

Input arrives in arbitrary Bytes chunks, exactly as a data stream delivers it. Capsule Values are never collected unless the application asked for them: DATAGRAM payloads up to CapsuleConfig::max_datagram_size and registered control capsules up to CapsuleConfig::max_capsule_size. Everything else is skipped or, for intermediaries, streamed as it arrives, so flow-control credit is always released (RFC 9297 §3.2, §3.5).

Structs§

CapsuleConfig
Limits and policy for CapsuleDecoder.
CapsuleDecoder
An incremental Capsule Protocol decoder.

Enums§

CapsuleError
A Capsule Protocol violation. The data stream must be treated as a malformed or incomplete message (RFC 9297 §3.3).
CapsuleEvent
An event produced by CapsuleDecoder::poll.
UnknownCapsules
Handling of capsule types the application did not register.

Functions§

encode_capsule
Encode a complete capsule into one buffer.