pub enum Representation {
    External,
    Internal {
        tag: String,
    },
    Adjacent {
        tag: String,
        content: String,
    },
    None,
}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"}Implementations§
Source§impl Representation
 
impl Representation
pub fn new() -> Self
pub fn is_default(&self) -> bool
pub fn is_external(&self) -> bool
pub fn is_internal(&self) -> bool
pub fn is_adjacent(&self) -> bool
pub fn is_none(&self) -> bool
Trait Implementations§
Source§impl Clone for Representation
 
impl Clone for Representation
Source§fn clone(&self) -> Representation
 
fn clone(&self) -> Representation
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from 
source. Read moreSource§impl Debug for Representation
 
impl Debug for Representation
Source§impl Default for Representation
 
impl Default for Representation
Source§fn default() -> Representation
 
fn default() -> Representation
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for Representation
 
impl<'de> Deserialize<'de> for Representation
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
Source§impl Hash for Representation
 
impl Hash for Representation
Source§impl PartialEq for Representation
 
impl PartialEq for Representation
Source§impl Serialize for Representation
 
impl Serialize for Representation
impl Eq for Representation
impl StructuralPartialEq for Representation
Auto Trait Implementations§
impl Freeze for Representation
impl RefUnwindSafe for Representation
impl Send for Representation
impl Sync for Representation
impl Unpin for Representation
impl UnwindSafe for Representation
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