Expand description
Procedural derives used by rustbinary.
Applications normally enable the matching rustbinary feature and use the
derives re-exported by the main crate. Generated paths intentionally refer
to ::rustbinary, keeping the runtime traits and wire implementation owned
by one crate.
The procedural macro runs on the host with std, but generated code uses
only core syntax and the selected RustBinary runtime traits, so consumers
may expand these derives in no_std crates.
§Macro selection
Fingerprintgenerates a compatibility identifier for type structure and codec configuration.StaticSizegenerates finite normal and bit-packed size bounds for statically sized values.Reflectgenerates allocation-free structural metadata.BitPackedgenerates a checked bit-level codec for bounded fields and nestedBitPackvalues.
The generated implementations are not a replacement for Serde derives.
Add Serialize and Deserialize when the value also crosses a normal
rustbinary or CBOR wire profile. For the complete syntax and production
constraints, see the package README and the re-exported runtime traits.
Derive Macros§
- BitPacked
- Derives
rustbinary::BitPackfor structs and enums. - Fingerprint
- Derives
rustbinary::Fingerprintfrom structural type metadata. - Reflect
- Derives allocation-free structural reflection metadata.
- Static
Size - Derives compile-time normal and bit-packed size bounds.