Available on crate feature
transport only.Expand description
§Parse-on-demand codec
The spine frames bytes into a WorkBatch WITHOUT
parsing. A transform/router that needs a field parses on demand here, format-
agnostic.
§Native, no JSON bridge
No rmp_serde -> serde_json::Value -> sonic_rs double-parse anywhere on the
parse path. Both arms decode natively:
- JSON –
sonic_rs(SIMD, AVX2/NEON). - MsgPack –
rmpvschema-lessValuedecoder. No intermediateserde_json::Value, no JSON re-serialise.
§Unified routing-field accessor
A router keys off ONE field and must not branch on wire format.
ParsedPayload exposes a format-agnostic accessor:
ParsedPayload::field_str– the common case: a top-level string field.ParsedPayload::field– aFieldRefover the scalar routing cases (string/int/float/bool/null); everything else collapses toFieldRef::Otherbecause routers do not key off containers.
Scope: top-level object-key lookup only. No deep JSON-path (YAGNI – keys live at the top level).
See docs/MIGRATIONS.md and docs/SELF-REGULATION.md. Block contract in
WorkBatch.
Enums§
- Codec
Error - A parse failure, tagged by the format that failed.
- Field
Ref - A borrowed view of one routing field, format-agnostic.
- Parsed
Payload - A parsed payload, retaining its native value representation.
Functions§
- parse
- Parse a framed payload into a native
ParsedPayload. - to_
json_ bytes - Serialise a JSON value to bytes via
sonic_rs(SIMD), no bridge. - to_
msgpack_ bytes - Serialise a MsgPack value to bytes via NATIVE
rmpv::encode::write_value.