[−][src]Struct witchcraft_metrics::MetricId
An identifier of a metric.
It consists of a name as well as a set of tags that can be used to further filter and partition the metrics.
Implementations
impl MetricId
[src]
pub fn new<T>(name: T) -> MetricId where
T: Into<Cow<'static, str>>,
[src]
T: Into<Cow<'static, str>>,
Creates a new metric ID with the specified name and no tags.
pub fn with_tag<K, V>(self, key: K, value: V) -> MetricId where
K: Into<Cow<'static, str>>,
V: Into<Cow<'static, str>>,
[src]
K: Into<Cow<'static, str>>,
V: Into<Cow<'static, str>>,
A builder-style method adding a tag to the metric ID.
pub fn name(&self) -> &str
[src]
Returns the ID's name.
pub fn tags(&self) -> &Tags
[src]
Returns the ID's tags.
Trait Implementations
impl Clone for MetricId
[src]
impl Debug for MetricId
[src]
impl Eq for MetricId
[src]
impl From<&'static str> for MetricId
[src]
impl From<Cow<'static, str>> for MetricId
[src]
impl From<String> for MetricId
[src]
impl Hash for MetricId
[src]
pub fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for MetricId
[src]
pub fn cmp(&self, other: &MetricId) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl PartialEq<MetricId> for MetricId
[src]
impl PartialOrd<MetricId> for MetricId
[src]
pub fn partial_cmp(&self, other: &MetricId) -> Option<Ordering>
[src]
pub fn lt(&self, other: &MetricId) -> bool
[src]
pub fn le(&self, other: &MetricId) -> bool
[src]
pub fn gt(&self, other: &MetricId) -> bool
[src]
pub fn ge(&self, other: &MetricId) -> bool
[src]
impl StructuralEq for MetricId
[src]
impl StructuralPartialEq for MetricId
[src]
Auto Trait Implementations
impl RefUnwindSafe for MetricId
impl Send for MetricId
impl Sync for MetricId
impl Unpin for MetricId
impl UnwindSafe for MetricId
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,