/// When serializing a unit variant (or any other kind of variant), formats
/// can choose whether to keep track of it by index or by name. Binary
/// formats typically use the index of the variant and human-readable formats
/// typically use the name.
When serializing a unit variant (or any other kind of variant), formats
can choose whether to keep track of it by index or by name. Binary
formats typically use the index of the variant and human-readable formats
typically use the name.
When serializing a unit variant ( or any other kind of variant ) formats can choose whether to keep track of it by index or by name . Binary formats typically use the index of the variant and human - readable formats typically use the name .
fn serialize_unit_variant(
        self,
        _name: &'static str,
        _variant_index: u32,
        variant: &'static str,
    ) -> Result<()> {
        self.serialize_str(variant)
    }
fn serialize_unit_variant ( self , _name : & ' static str , _variant_index : u32 , variant : & ' static str , ) -> Result < ( ) > { self . serialize_str ( variant ) }
When serializing a unit variant (or any other kind of variant), formats
can choose whether to keep track of it by index or by name.
When serializing a unit variant ( or any other kind of variant ) formats can choose whether to keep track of it by index or by name .
self
<not_specific>
_name
&'static str
<not_specific>
_variant_index
u32
<not_specific>
variant
&'static str
<not_specific>