Skip to main content

Module codec

Module codec 

Source
Expand description

Codec layer for serializing/deserializing Synapse messages

This module provides codec implementations for converting between SynapseMessage (the wire envelope) and bytes. Codecs handle pure serialization - they don’t handle I/O, framing, or transport concerns.

Re-exports§

pub use content_type::ContentType;
pub use json::JsonCodec;
pub use protobuf::ProtobufCodec;

Modules§

content_type
Content type discrimination for dual protocol support
json
JSON codec implementation
protobuf
Protobuf codec implementation

Traits§

Codec
Codec trait for serializing/deserializing SynapseMessage envelope

Functions§

decode_message
Get the appropriate decoder function for a content type
encode_message
Get the appropriate encoder function for a content type