Skip to main content

Module codec

Module codec 

Source
Expand description

Fixed-width little-endian envelopes and explicit payload codecs.

Structs§

DecodeContext
Stateful resource budget shared by one complete protocol decode.
DecodedMessage
An owned, fully validated decoded message and its common metadata.
Envelope
Caller-provided metadata for a newly encoded message.
Limits
Bounded decoder policy applied before a protocol allocates or creates records.
RelativeRange
A checked relative byte range within one containing record.

Enums§

DecodeError
Decoder failures; values remain bounded and contain no peer-provided text.
EncodeError
Encoder failures; values remain bounded and contain no peer-provided text.
LimitKind
Decoder resource limit that was exceeded.

Constants§

ENVELOPE_LEN
Bytes occupied by the common message envelope.
MESSAGE_MAGIC
Wire signature at the start of every encoded message.
VERSION_MAJOR
Current incompatible wire revision.
VERSION_MINOR
Current exact wire revision; decoders reject any different minor value.

Traits§

Protocol
Explicit protocol payload codec.

Functions§

decode_message
Validates the common envelope, bounds, and schema before decoding a payload.
encode_message
Encodes a common envelope followed by an explicitly encoded payload.