pub trait EncodeLabelValue {
// Required method
fn encode_label_value(&self) -> LabelValue<'_>;
}Expand description
Encodes a single field as a LabelValue.
Implemented for the standard label-supported types so the
#[derive(EncodeLabelSet)] macro can borrow string fields without
allocating on each scrape.
Required Methods§
Sourcefn encode_label_value(&self) -> LabelValue<'_>
fn encode_label_value(&self) -> LabelValue<'_>
Borrows or copies self into a LabelValue.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".