Skip to main content

Module envelope

Module envelope 

Source
Expand description

Shared durable envelope codec and validation errors.

Structs§

EncodedEnvelope
One encoding and the envelope derived from those exact bytes.
EnvelopeProbe
Identifying prefix of a durable envelope document.
VerifiedEnvelope
An envelope whose framing was verified on read or derived on write.

Enums§

EnvelopeCodecError
Failure vocabulary shared by every envelope codec. Messages are envelope-generic; the wrapping error names the object (and its key) the bytes came from.

Functions§

decode_json_envelope
Decodes one JSON-bodied envelope, then checks its kind, version, checksum, and payload. Unknown envelope fields are rejected for every durable family.
encode_json_envelope
Serializes the payload once and derives framing from those same bytes.
verify_kind
Requires the probed kind to be exactly expected.
verify_payload_checksum
Requires the stored checksum to match the payload bytes as stored.
verify_version
Requires the probed format version to be exactly what this build writes for kind — no envelope family tolerates version skew.