pub trait MetricTag: Sealed {
// Required method
fn into_label(self) -> Label;
}Expand description
A metric tag.
Marker trait for types which can support being used as a metric tag, in order to optimize their internal representation to avoid unnecessary allocations.
This trait is sealed and can’t be implemented outside of this crate.
Required Methods§
Sourcefn into_label(self) -> Label
fn into_label(self) -> Label
Consumes self and converts it to a tag.
Under the hood, the metrics crate is used, which calls tags “labels” instead, which is where the
return type naming comes from.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".