pub fn serializer(
    writer: &mut impl ?Sized + Write
) -> impl '_ + Serializer<Ok = (), Error = Error>
Expand description

A serializer for Prometheus labels.

This serializer only supports structs.

For struct fields, the supported values are scalars, strings, and bytes that can be converted to strings. Nones and units are ignored, and unit variants are serialized as their name. Anything else results in an error.

Prometheus labels are a sequence of comma-separated key-value pairs as specified by the Prometheus documentation.