Function serde_variant::to_variant_name
source · pub fn to_variant_name<T>(value: &T) -> Result<&'static str, UnsupportedType>where
T: Serialize,
Expand description
Convert an enum variant into its name.
Note that only enum variants may be converted here and all other
types will result in an UnsupportedType
error.