Update attribute docs
This commit is contained in:
parent
846c49e07e
commit
f639598314
1 changed files with 11 additions and 0 deletions
|
@ -14,6 +14,7 @@ TABLE OF CONTENTS
|
||||||
1. [Supported Serde Attributes](#supported-serde-attributes)
|
1. [Supported Serde Attributes](#supported-serde-attributes)
|
||||||
- [`rename`](#rename)
|
- [`rename`](#rename)
|
||||||
- [`rename_all`](#rename_all)
|
- [`rename_all`](#rename_all)
|
||||||
|
- [`rename_all_fields`](#rename_all_fields)
|
||||||
- [`tag` / `content` / `untagged`](#tag)
|
- [`tag` / `content` / `untagged`](#tag)
|
||||||
- [`default`](#default)
|
- [`default`](#default)
|
||||||
- [`skip`](#skip)
|
- [`skip`](#skip)
|
||||||
|
@ -67,6 +68,16 @@ Set on a struct, enum or variant to rename all fields according to the given cas
|
||||||
|
|
||||||
Serde docs: [container](https://serde.rs/container-attrs.html#rename_all) / [variant](https://serde.rs/variant-attrs.html#rename_all)
|
Serde docs: [container](https://serde.rs/container-attrs.html#rename_all) / [variant](https://serde.rs/variant-attrs.html#rename_all)
|
||||||
|
|
||||||
|
<h3 id="rename_all_fields">
|
||||||
|
|
||||||
|
`#[serde(rename_all_fields = "...")]` / `#[schemars(rename_all_fields = "...")]`
|
||||||
|
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
Set on an enum to rename all fields of all struct-style variants according to the given case convention (see the Serde docs for details).
|
||||||
|
|
||||||
|
Serde docs: [container](https://serde.rs/container-attrs.html#rename_all)
|
||||||
|
|
||||||
<h3 id="tag" style="line-height: 1.5">
|
<h3 id="tag" style="line-height: 1.5">
|
||||||
|
|
||||||
`#[serde(tag = "type")]` / `#[schemars(tag = "type")]` <br />
|
`#[serde(tag = "type")]` / `#[schemars(tag = "type")]` <br />
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue