Skip to main content

Module serialization

Module serialization 

Source
Expand description

Pluggable serializer registry for remote payloads. Core.

Every payload that crosses the wire carries a serializer_id and a manifest (type name). On the receiving side those two fields key into the SerializerRegistry to recover the original Rust type.

Built-in serializers:

idnamewire format
0systembincode (control)
1bincodebincode v2 + serde
2jsonserde_json

Structs§

SerializerRegistry
Per-system registry mapping a manifest to a TypeCodec.
TypeCodec
Closure pair that knows how to encode/decode one Rust type to/from wire bytes. The registry maps a manifest (type name) to one of these.

Enums§

SerializeError

Constants§

BINCODE_SERIALIZER_ID
JSON_SERIALIZER_ID
SYSTEM_SERIALIZER_ID

Functions§

bincode_decode
bincode_encode
json_decode
json_encode
system_decode
system_encode
System control payloads use the same bincode codec but a reserved serializer_id of SYSTEM_SERIALIZER_ID so receivers can dispatch them on the system path without consulting the user manifest table.