pub struct OrderedPromLabelSet { /* private fields */ }Expand description
Maintains a mapping of metric labels->values with a defined ordering, used for Prometheus labels
Implementations§
Source§impl OrderedPromLabelSet
impl OrderedPromLabelSet
Sourcepub fn keys_ordered(&self) -> impl Iterator<Item = &str>
pub fn keys_ordered(&self) -> impl Iterator<Item = &str>
Iterate over label keys in sorted order.
Sourcepub fn as_prom_labels(&self) -> HashMap<&str, String>
pub fn as_prom_labels(&self) -> HashMap<&str, String>
Return a map of label keys to their string values, suitable for Prometheus.
Sourcepub fn add_kv(&mut self, kv: MetricKeyValue)
pub fn add_kv(&mut self, kv: MetricKeyValue)
Insert a key-value pair, replacing dashes with underscores per Prometheus conventions.
Trait Implementations§
Source§impl Clone for OrderedPromLabelSet
impl Clone for OrderedPromLabelSet
Source§fn clone(&self) -> OrderedPromLabelSet
fn clone(&self) -> OrderedPromLabelSet
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OrderedPromLabelSet
impl Debug for OrderedPromLabelSet
Source§impl Default for OrderedPromLabelSet
impl Default for OrderedPromLabelSet
Source§fn default() -> OrderedPromLabelSet
fn default() -> OrderedPromLabelSet
Returns the “default value” for a type. Read more
Source§impl From<NewAttributes> for OrderedPromLabelSet
impl From<NewAttributes> for OrderedPromLabelSet
Source§fn from(n: NewAttributes) -> Self
fn from(n: NewAttributes) -> Self
Converts to this type from the input type.
Source§impl PartialEq for OrderedPromLabelSet
impl PartialEq for OrderedPromLabelSet
impl StructuralPartialEq for OrderedPromLabelSet
Auto Trait Implementations§
impl Freeze for OrderedPromLabelSet
impl RefUnwindSafe for OrderedPromLabelSet
impl Send for OrderedPromLabelSet
impl Sync for OrderedPromLabelSet
impl Unpin for OrderedPromLabelSet
impl UnsafeUnpin for OrderedPromLabelSet
impl UnwindSafe for OrderedPromLabelSet
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request