[][src]Struct witchcraft_metrics::MetricId

pub struct MetricId { /* fields omitted */ }

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]

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]

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]

impl Ord for MetricId[src]

impl PartialEq<MetricId> for MetricId[src]

impl PartialOrd<MetricId> for MetricId[src]

impl StructuralEq for MetricId[src]

impl StructuralPartialEq for MetricId[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,