EncodeLabelValue

Derive Macro EncodeLabelValue 

Source
#[derive(EncodeLabelValue)]
Expand description

This macro generates an implementation of the EncodeLabelValue trait, which allows them to be used as values in metric labels. This is useful for ensuring type safety when using enumerated values as labels.

ยงExample

#[derive(EncodeLabelValue)]
enum Status {
    Success,
    Error,
    Pending,
}