pub enum EnumRepresentation {
External,
Untagged,
Tagged {
tag: Spanned<String>,
content: Option<Spanned<String>>,
},
}
Variants§
External
The default
e.g { User: { id: 1200, name: "Smithy" } }
Untagged
e.g { id: 1200, name: "Smithy" }
Tagged
e.g { type: "User", id: 1200, name: "Smithy" }
e.g { type: "User", content: { id: 1200, name: "Smithy" } }
Trait Implementations§
Source§impl Debug for EnumRepresentation
impl Debug for EnumRepresentation
Source§impl<'de> Deserialize<'de> for EnumRepresentation
impl<'de> Deserialize<'de> for EnumRepresentation
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for EnumRepresentation
impl RefUnwindSafe for EnumRepresentation
impl Send for EnumRepresentation
impl Sync for EnumRepresentation
impl Unpin for EnumRepresentation
impl UnwindSafe for EnumRepresentation
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