Skip to main content

Crate aequora_codec

Crate aequora_codec 

Source
Expand description

Checksummed framing and serialization codecs.

Structs§

DecodeLimits
Independent wire and decompressed limits used to prevent compression bombs.
DecodedFrame
Decoded, integrity-checked protocol frame.
EncodeOptions
Encoding controls for one frame.
FrameHeader
Validated fixed header. Reading this before the payload permits an oversized frame to be rejected without allocating its declared body.

Enums§

CodecError
Wire decoding or encoding failure.
Compression
Optional payload compression selected after capability negotiation.
MessageKind
Frame message discriminator.

Constants§

FLAG_ZSTD
Frame flag indicating a zstd-compressed Postcard payload.
HEADER_LEN
Fixed header size: magic, version, flags, kind, length, and BLAKE3 digest.
MAGIC
Aequora protocol magic.

Functions§

decode
Decodes and deserializes a framed Postcard value of the expected kind.
decode_borrowed
Deserializes a borrowed typed view directly from an uncompressed stable frame buffer. The returned value cannot outlive frame, keeping borrowed lifetimes away from durable state.
decode_frame
Validates and splits a frame without deserializing its payload.
decode_with_limits
Decodes a frame with separate compressed-wire and decompressed payload limits.
encode
Encodes a serializable value as a checksummed Postcard Aequora frame.
encode_bytes
Encodes directly into immutable reference-counted bytes for transport handoff without a payload clone.
encode_bytes_with_options
Encodes a checksummed frame into a controlled BytesMut construction buffer and freezes it for immutable sharing at the transport boundary.
encode_with_options
Encodes a checksummed frame with thresholded negotiated compression.
inspect_header
Validates the fixed frame preamble and declared length before callers allocate or read the payload body.