Enum serde_derive_internals::attr::TagType
source · pub enum TagType {
External,
Internal {
tag: String,
},
Adjacent {
tag: String,
content: String,
},
None,
}
Expand description
Styles of representing an enum.
Variants§
External
The default.
{"variant1": {"key1": "value1", "key2": "value2"}}
Internal
#[serde(tag = "type")]
{"type": "variant1", "key1": "value1", "key2": "value2"}
Adjacent
#[serde(tag = "t", content = "c")]
{"t": "variant1", "c": {"key1": "value1", "key2": "value2"}}
None
#[serde(untagged)]
{"key1": "value1", "key2": "value2"}
Auto Trait Implementations§
impl Freeze for TagType
impl RefUnwindSafe for TagType
impl Send for TagType
impl Sync for TagType
impl Unpin for TagType
impl UnwindSafe for TagType
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more