Skip to main content

Module codec

Module codec 

Source
Expand description

Avro codec utilities for encoding and decoding Salesforce Pub/Sub events.

Salesforce Pub/Sub events are encoded as Avro binary (not JSON). Each event carries a schema_id in its header that identifies the Avro schema required for decoding.

Functionsยง

decode_avro
Decode Avro-binary bytes into a serde_json::Value using the given schema.
decode_avro_typed
Decode Avro-binary bytes directly into a typed struct T using the given schema.
encode_avro
Encode a serializable value to Avro binary using the given schema.