pub struct LabelName(/* private fields */);Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for LabelName
impl<'de> Deserialize<'de> for LabelName
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for LabelName
Source§impl Ord for LabelName
impl Ord for LabelName
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for LabelName
impl PartialOrd for LabelName
Source§impl PrometheusSerializable for LabelName
impl PrometheusSerializable for LabelName
Source§fn to_prometheus(&self) -> String
fn to_prometheus(&self) -> String
In Prometheus:
- Labels may contain ASCII letters, numbers, as well as underscores. They must match the regex [a-zA-Z_][a-zA-Z0-9_]*.
- Label names beginning with __ (two “_”) are reserved for internal use.
- Label values may contain any Unicode characters.
- Labels with an empty label value are considered equivalent to labels that do not exist.
The label name is changed:
- If a label name starts with, or contains, an invalid character: replace character with underscore.
- If th label name starts with two underscores: add additional underscore (three underscores total)
impl StructuralPartialEq for LabelName
Auto Trait Implementations§
impl Freeze for LabelName
impl RefUnwindSafe for LabelName
impl Send for LabelName
impl Sync for LabelName
impl Unpin for LabelName
impl UnsafeUnpin for LabelName
impl UnwindSafe for LabelName
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