Enum serde_derive_internals::attr::EnumTag
[−]
[src]
pub enum EnumTag { External, Internal { tag: String, }, Adjacent { tag: String, content: String, }, None, }
Styles of representing an enum.
Variants
External
The default.
{"variant1": {"key1": "value1", "key2": "value2"}}
Internal
#[serde(tag = "type")]
{"type": "variant1", "key1": "value1", "key2": "value2"}
Fields of Internal
tag: String |
Adjacent
#[serde(tag = "t", content = "c")]
{"t": "variant1", "c": {"key1": "value1", "key2": "value2"}}
Fields of Adjacent
tag: String | |
content: String |
None
#[serde(untagged)]
{"key1": "value1", "key2": "value2"}