Expand description
Decoding a payload from a bundle alone (spec core.md §7.1–§7.2), for
tools that were never compiled against the contract.
- Decode order (observer §7.3): a payload whose declared type the
tool holds is decoded by that type, on the wire its sample’s
Encodingnames. Any other payload is sniffed. - protobuf decodes through the bundle’s
FileDescriptorSet(prost-reflect), without codegen; jsonschema types are JSON or CBOR. Both render field by field, as JSON. - packed (core §7.6) reads through the bundle’s layout, under the
tag the record’s envelope carried (
Context): a record with no tag, or one its layout refuses, is undecodable with the refusal named. - Honest rendering: a
rawtype renders as its declared media type and the sample’s size, and bytes that do not decode as their declared type render as that type, the size and the reason. Neither garbage nor nothing.
Structs§
- Context
- What a reader holds of a payload beside its bytes and its
Encoding: what a packed record is read with (core §7.6).
Enums§
- Rendered
- What a payload renders as.
Functions§
- declared
- A canonical type reference in the authoring spelling (spec §7.2, 0.8):
the message name for protobuf,
json:<name>for a JSON Schema type, the media type for a raw one. A tool names a type this way wherever it renders one, decoded or not. - decode
- Decodes
bytesof the typety(a canonical type reference ofbundle).encodingis the sample’sEncodingas zenoh spells it (application/json,application/cbor,application/protobuf, …), if any. A packed type decodes only with its envelope’s tag in hand:decode_in. - decode_
in decode, with what the reader holds beside the bytes: a packed record is read through the bundle’s layout under its envelope’s tag and the deployment epoch (core §7.6), refused by name as the layout refuses it.- epoch_
assumed - The deployment epoch
decode_inreads a record oftyunder whencxstates none:crate::packed::DEFAULT_EPOCHfor a packed type whose layout holds atimefield,Nonefor every other type and whenevercxstates one. Such a record’stimevalues are right only where the deployment’s epoch is that one (core §7.6 carries it nowhere yet; #980), so a tool that shows them says so beside them. - type_of
- The canonical type reference of a resource’s member (
type,attachment,request,response,errororsummary), found by the resource’s kind token and template.