pub fn extract_name<S>(value: &S) -> MessageNamewhere
    S: Serialize + ?Sized,
Expand description

Extract a name from the provided Serialize instance:

  • for structs it returns the struct’s name;
  • for enums it returns EnumName::VariantName;
  • fallback to extract_name_by_type.

Availability

This API is marked as unstable and is only available when the unstable crate feature is enabled. This comes with no stability guarantees, and could be changed or removed at any time.