pub enum MetricKind {
Counter,
Gauge,
Timer,
Rate,
Histogram,
}Expand description
Metric kind tag stored alongside help/unit metadata.
Used by exporters to emit the correct # TYPE line and to choose a
rendering strategy (e.g., counter vs. gauge semantics).
Variants§
Counter
Monotonic counter (resets only on process restart / explicit reset).
Gauge
Arbitrary-direction gauge.
Timer
Timing distribution.
Rate
Rate over a tumbling window.
Histogram
Histogram of observations bucketed by value.
Implementations§
Source§impl MetricKind
impl MetricKind
Sourcepub const fn as_prometheus_type(self) -> &'static str
pub const fn as_prometheus_type(self) -> &'static str
Lower-case Prometheus/OpenMetrics # TYPE token.
Trait Implementations§
Source§impl Clone for MetricKind
impl Clone for MetricKind
Source§fn clone(&self) -> MetricKind
fn clone(&self) -> MetricKind
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 MetricKind
impl Debug for MetricKind
Source§impl Hash for MetricKind
impl Hash for MetricKind
Source§impl PartialEq for MetricKind
impl PartialEq for MetricKind
Source§fn eq(&self, other: &MetricKind) -> bool
fn eq(&self, other: &MetricKind) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for MetricKind
impl Eq for MetricKind
impl StructuralPartialEq for MetricKind
Auto Trait Implementations§
impl Freeze for MetricKind
impl RefUnwindSafe for MetricKind
impl Send for MetricKind
impl Sync for MetricKind
impl Unpin for MetricKind
impl UnsafeUnpin for MetricKind
impl UnwindSafe for MetricKind
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