pub struct MetricSpec {
pub name: &'static str,
pub kind: StatsMetricType,
pub description: &'static str,
}Expand description
Static descriptor for a metric: how it is interpreted, what its canonical lower-case name is, and a one-line human description.
§Examples
use dynomite::stats::{POOL_CODEC, MetricSpec};
let first: &MetricSpec = &POOL_CODEC[0];
assert!(!first.name.is_empty());Fields§
§name: &'static strLower-case identifier as emitted in JSON.
kind: StatsMetricTypeWhether the metric is a counter, gauge, or timestamp.
description: &'static strFree-form description used by the --describe-stats CLI flag.
Trait Implementations§
Source§impl Clone for MetricSpec
impl Clone for MetricSpec
Source§fn clone(&self) -> MetricSpec
fn clone(&self) -> MetricSpec
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 MetricSpec
impl Debug for MetricSpec
Source§impl PartialEq for MetricSpec
impl PartialEq for MetricSpec
Source§fn eq(&self, other: &MetricSpec) -> bool
fn eq(&self, other: &MetricSpec) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for MetricSpec
impl Eq for MetricSpec
impl StructuralPartialEq for MetricSpec
Auto Trait Implementations§
impl Freeze for MetricSpec
impl RefUnwindSafe for MetricSpec
impl Send for MetricSpec
impl Sync for MetricSpec
impl Unpin for MetricSpec
impl UnsafeUnpin for MetricSpec
impl UnwindSafe for MetricSpec
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.