Expand description
serde adapters for the quirks of the protobuf-JSON encoding.
The harness serialises its protobuf messages with the canonical JSON
mapping, which departs from what #[derive(Deserialize)] would assume in
three places:
- 64-bit integers are strings.
{"seqNum": "17"}, not{"seqNum": 17}. Decoders are expected to accept both, soopt_intandvec_inttake either and always emit the string form. bytesis base64.opt_bytesandvec_bytesdecode standard and URL-safe alphabets, with or without padding, and emit standard padded.- Enums are value names, though numbers are also legal input. Generated
enums decode through
EnumReprand keep unrecognised values rather than failing, so a harness newer than this crate stays readable.
Modules§
- opt_
bytes - A
bytesfield that may be absent, encoded as base64. - opt_int
- A 64-bit integer that may be absent, encoded as a JSON string.
- vec_
bytes - A repeated
bytesfield, encoded as base64 strings. - vec_int
- A repeated 64-bit integer field, encoded as JSON strings.
Enums§
- Enum
Repr - How a protobuf enum arrived on the wire: by name, or by number.