Skip to main content

Module codec

Module codec 

Source
Expand description

Encoding and decoding functions

This module provides the core serialization functions for the wire format. Primary format is MessagePack (via rmp-serde) for performance, with JSON wrappers for debugging and external tool interoperability.

Functionsยง

decode
Decode an envelope from binary format (MessagePack)
decode_message
Decode any deserializable value from MessagePack bytes.
encode
Encode an envelope to binary format (MessagePack)
encode_message
Encode any serializable value to MessagePack bytes.
encoded_size
Get the size of an encoded envelope in bytes
from_json
Parse an envelope from JSON
from_json_string
Decode from JSON string
to_json
Convert an envelope to JSON (for debugging/external tools)
to_json_string
Encode to JSON string
to_json_string_pretty
Encode to pretty JSON string (for debugging)