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§
- Capsule
Config - Limits and policy for
CapsuleDecoder. - Capsule
Decoder - An incremental Capsule Protocol decoder.
Enums§
- Capsule
Error - A Capsule Protocol violation. The data stream must be treated as a malformed or incomplete message (RFC 9297 §3.3).
- Capsule
Event - An event produced by
CapsuleDecoder::poll. - Unknown
Capsules - Handling of capsule types the application did not register.
Functions§
- encode_
capsule - Encode a complete capsule into one buffer.