Minor restyling of attribute docs
This commit is contained in:
parent
08f7fa44a7
commit
1e17c46803
1 changed files with 6 additions and 4 deletions
|
@ -22,7 +22,7 @@ Serde also allows setting `#[serde(...)]` attributes which change how types are
|
|||
1. [Supported Serde Attributes](#supported-serde-attributes)
|
||||
- [`rename`](#rename)
|
||||
- [`rename_all`](#rename_all)
|
||||
- [`tag` / `untagged`](#tag)
|
||||
- [`tag` / `content` / `untagged`](#tag)
|
||||
- [`default`](#default)
|
||||
- [`skip`](#skip)
|
||||
- [`skip_serializing`](#skip_serializing)
|
||||
|
@ -56,14 +56,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)
|
||||
|
||||
<h3 id="tag">
|
||||
<h3 id="tag" style="line-height: 1.5">
|
||||
|
||||
`#[serde(tag = "type")]` / `#[schemars(tag = "type")]` / `#[serde(tag = "t", content = "c")]` / `#[schemars(tag = "t", content = "c")]` / `#[serde(untagged)]` / `#[schemars(untagged)]`
|
||||
`#[serde(tag = "type")]` / `#[schemars(tag = "type")]` <br />
|
||||
`#[serde(tag = "t", content = "c")]` / `#[schemars(tag = "t", content = "c")]` <br />
|
||||
`#[serde(untagged)]` / `#[schemars(untagged)]`
|
||||
</h3>
|
||||
|
||||
Set on an enum to generate the schema for the [internally tagged](https://serde.rs/enum-representations.html#internally-tagged), [adjacently tagged](https://serde.rs/enum-representations.html#adjacently-tagged), or [untagged](https://serde.rs/enum-representations.html#untagged) representation of this enum.
|
||||
|
||||
Serde docs: [`tag`](https://serde.rs/container-attrs.html#tag) / [`tag`/`content`](https://serde.rs/container-attrs.html#tag--content) / [`untagged`](https://serde.rs/container-attrs.html#untagged)
|
||||
Serde docs: [`tag`](https://serde.rs/container-attrs.html#tag) / [`tag`+`content`](https://serde.rs/container-attrs.html#tag--content) / [`untagged`](https://serde.rs/container-attrs.html#untagged)
|
||||
|
||||
<h3 id="default">
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue