Expand description
The serde wire-name surface: JSON/serialization names, never host-language identifiers.
serde_rename and serde_rename_all define wire names only. Nothing here may be used to
spell a public host identifier — that is super::host’s job. ~keep
Functions§
- apply_
serde_ rename_ all - Apply a serde
rename_allstrategy to a Rust identifier. - field_
uses_ duration_ map_ wire - True when a
Duration-typed field’s wire shape is the object serde’s derive produces ({"secs":u64,"nanos":u32}) rather than the shape a hand-written codec writes. - serde_
wire_ name - Resolve a serde wire name, with explicit
serde(rename)taking precedence. - wire_
field_ name - Resolve a wire field name from field metadata.
- wire_
field_ name_ camel - Resolve a wire field name for the napi/wasm JSON-passthrough emitters, where the product
decision is that JavaScript-facing JSON is camelCase all the way down (including nested
payloads), independent of whatever
rename_allthe Rust container declares for its own serde wire format. An explicit#[serde(rename = "...")]is author intent and still wins verbatim – only a name derived mechanically from the Rust field identifier gets recased. - wire_
variant_ value - Resolve a wire enum variant value from variant metadata.