Overview of Serde attributes
Serde attributes are used to customize the Serialize and Deserialize implementations generated by Serde's derive macros. They require a Rust compiler version 1.15 or newer. Attributes are categorized based on where they are applied:
- Container attributes: Apply to a struct or enum declaration.
- Variant attributes: Apply to a specific variant of an enum.
- Field attributes: Apply to a single field within a struct or an enum variant.
A single struct, enum, variant, or field can have multiple attributes applied to it.