mas_tower

Trait MetricsAttributes

Source
pub trait MetricsAttributes<T> {
    type Iter<'a>: Iterator<Item = KeyValue>
       where Self: 'a,
             T: 'a;

    // Required method
    fn attributes<'a>(&'a self, t: &'a T) -> Self::Iter<'a>;
}
Expand description

Make metrics attributes from a type.

Required Associated Types§

Source

type Iter<'a>: Iterator<Item = KeyValue> where Self: 'a, T: 'a

Required Methods§

Source

fn attributes<'a>(&'a self, t: &'a T) -> Self::Iter<'a>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<T> MetricsAttributes<T> for ()
where T: 'static,

Source§

type Iter<'a> = Empty<KeyValue>

Source§

fn attributes(&self, _t: &T) -> Self::Iter<'_>

Source§

impl<T> MetricsAttributes<T> for KeyValue
where T: 'static,

Source§

type Iter<'a> = Once<KeyValue>

Source§

fn attributes(&self, _t: &T) -> Self::Iter<'_>

Source§

impl<T, V1> MetricsAttributes<T> for (V1,)
where T: 'static, V1: MetricsAttributes<T> + 'static,

Source§

type Iter<'a> = <V1 as MetricsAttributes<T>>::Iter<'a>

Source§

fn attributes<'a>(&'a self, t: &'a T) -> Self::Iter<'a>

Source§

impl<T, V1, V2> MetricsAttributes<T> for (V1, V2)
where T: 'static, V1: MetricsAttributes<T> + 'static, V2: MetricsAttributes<T> + 'static,

Source§

type Iter<'a> = Chain<<V1 as MetricsAttributes<T>>::Iter<'a>, <V2 as MetricsAttributes<T>>::Iter<'a>>

Source§

fn attributes<'a>(&'a self, t: &'a T) -> Self::Iter<'a>

Source§

impl<T, V1, V2, V3> MetricsAttributes<T> for (V1, V2, V3)
where T: 'static, V1: MetricsAttributes<T> + 'static, V2: MetricsAttributes<T> + 'static, V3: MetricsAttributes<T> + 'static,

Source§

type Iter<'a> = Chain<Chain<<V1 as MetricsAttributes<T>>::Iter<'a>, <V2 as MetricsAttributes<T>>::Iter<'a>>, <V3 as MetricsAttributes<T>>::Iter<'a>>

Source§

fn attributes<'a>(&'a self, t: &'a T) -> Self::Iter<'a>

Source§

impl<T, V1, V2, V3, V4> MetricsAttributes<T> for (V1, V2, V3, V4)
where T: 'static, V1: MetricsAttributes<T> + 'static, V2: MetricsAttributes<T> + 'static, V3: MetricsAttributes<T> + 'static, V4: MetricsAttributes<T> + 'static,

Source§

type Iter<'a> = Chain<Chain<Chain<<V1 as MetricsAttributes<T>>::Iter<'a>, <V2 as MetricsAttributes<T>>::Iter<'a>>, <V3 as MetricsAttributes<T>>::Iter<'a>>, <V4 as MetricsAttributes<T>>::Iter<'a>>

Source§

fn attributes<'a>(&'a self, t: &'a T) -> Self::Iter<'a>

Source§

impl<T, V1, V2, V3, V4, V5> MetricsAttributes<T> for (V1, V2, V3, V4, V5)
where T: 'static, V1: MetricsAttributes<T> + 'static, V2: MetricsAttributes<T> + 'static, V3: MetricsAttributes<T> + 'static, V4: MetricsAttributes<T> + 'static, V5: MetricsAttributes<T> + 'static,

Source§

type Iter<'a> = Chain<Chain<Chain<Chain<<V1 as MetricsAttributes<T>>::Iter<'a>, <V2 as MetricsAttributes<T>>::Iter<'a>>, <V3 as MetricsAttributes<T>>::Iter<'a>>, <V4 as MetricsAttributes<T>>::Iter<'a>>, <V5 as MetricsAttributes<T>>::Iter<'a>>

Source§

fn attributes<'a>(&'a self, t: &'a T) -> Self::Iter<'a>

Source§

impl<T, V1, V2, V3, V4, V5, V6> MetricsAttributes<T> for (V1, V2, V3, V4, V5, V6)
where T: 'static, V1: MetricsAttributes<T> + 'static, V2: MetricsAttributes<T> + 'static, V3: MetricsAttributes<T> + 'static, V4: MetricsAttributes<T> + 'static, V5: MetricsAttributes<T> + 'static, V6: MetricsAttributes<T> + 'static,

Source§

type Iter<'a> = Chain<Chain<Chain<Chain<Chain<<V1 as MetricsAttributes<T>>::Iter<'a>, <V2 as MetricsAttributes<T>>::Iter<'a>>, <V3 as MetricsAttributes<T>>::Iter<'a>>, <V4 as MetricsAttributes<T>>::Iter<'a>>, <V5 as MetricsAttributes<T>>::Iter<'a>>, <V6 as MetricsAttributes<T>>::Iter<'a>>

Source§

fn attributes<'a>(&'a self, t: &'a T) -> Self::Iter<'a>

Source§

impl<T, V1, V2, V3, V4, V5, V6, V7> MetricsAttributes<T> for (V1, V2, V3, V4, V5, V6, V7)
where T: 'static, V1: MetricsAttributes<T> + 'static, V2: MetricsAttributes<T> + 'static, V3: MetricsAttributes<T> + 'static, V4: MetricsAttributes<T> + 'static, V5: MetricsAttributes<T> + 'static, V6: MetricsAttributes<T> + 'static, V7: MetricsAttributes<T> + 'static,

Source§

type Iter<'a> = Chain<Chain<Chain<Chain<Chain<Chain<<V1 as MetricsAttributes<T>>::Iter<'a>, <V2 as MetricsAttributes<T>>::Iter<'a>>, <V3 as MetricsAttributes<T>>::Iter<'a>>, <V4 as MetricsAttributes<T>>::Iter<'a>>, <V5 as MetricsAttributes<T>>::Iter<'a>>, <V6 as MetricsAttributes<T>>::Iter<'a>>, <V7 as MetricsAttributes<T>>::Iter<'a>>

Source§

fn attributes<'a>(&'a self, t: &'a T) -> Self::Iter<'a>

Source§

impl<T, V1, V2, V3, V4, V5, V6, V7, V8> MetricsAttributes<T> for (V1, V2, V3, V4, V5, V6, V7, V8)
where T: 'static, V1: MetricsAttributes<T> + 'static, V2: MetricsAttributes<T> + 'static, V3: MetricsAttributes<T> + 'static, V4: MetricsAttributes<T> + 'static, V5: MetricsAttributes<T> + 'static, V6: MetricsAttributes<T> + 'static, V7: MetricsAttributes<T> + 'static, V8: MetricsAttributes<T> + 'static,

Source§

type Iter<'a> = Chain<Chain<Chain<Chain<Chain<Chain<Chain<<V1 as MetricsAttributes<T>>::Iter<'a>, <V2 as MetricsAttributes<T>>::Iter<'a>>, <V3 as MetricsAttributes<T>>::Iter<'a>>, <V4 as MetricsAttributes<T>>::Iter<'a>>, <V5 as MetricsAttributes<T>>::Iter<'a>>, <V6 as MetricsAttributes<T>>::Iter<'a>>, <V7 as MetricsAttributes<T>>::Iter<'a>>, <V8 as MetricsAttributes<T>>::Iter<'a>>

Source§

fn attributes<'a>(&'a self, t: &'a T) -> Self::Iter<'a>

Source§

impl<T, V1, V2, V3, V4, V5, V6, V7, V8, V9> MetricsAttributes<T> for (V1, V2, V3, V4, V5, V6, V7, V8, V9)
where T: 'static, V1: MetricsAttributes<T> + 'static, V2: MetricsAttributes<T> + 'static, V3: MetricsAttributes<T> + 'static, V4: MetricsAttributes<T> + 'static, V5: MetricsAttributes<T> + 'static, V6: MetricsAttributes<T> + 'static, V7: MetricsAttributes<T> + 'static, V8: MetricsAttributes<T> + 'static, V9: MetricsAttributes<T> + 'static,

Source§

type Iter<'a> = Chain<Chain<Chain<Chain<Chain<Chain<Chain<Chain<<V1 as MetricsAttributes<T>>::Iter<'a>, <V2 as MetricsAttributes<T>>::Iter<'a>>, <V3 as MetricsAttributes<T>>::Iter<'a>>, <V4 as MetricsAttributes<T>>::Iter<'a>>, <V5 as MetricsAttributes<T>>::Iter<'a>>, <V6 as MetricsAttributes<T>>::Iter<'a>>, <V7 as MetricsAttributes<T>>::Iter<'a>>, <V8 as MetricsAttributes<T>>::Iter<'a>>, <V9 as MetricsAttributes<T>>::Iter<'a>>

Source§

fn attributes<'a>(&'a self, t: &'a T) -> Self::Iter<'a>

Source§

impl<V, T> MetricsAttributes<T> for Option<V>
where V: MetricsAttributes<T> + 'static, T: 'static,

Source§

type Iter<'a> = Flatten<IntoIter<<V as MetricsAttributes<T>>::Iter<'a>>>

Source§

fn attributes<'a>(&'a self, t: &'a T) -> Self::Iter<'a>

Source§

impl<V, T> MetricsAttributes<T> for Vec<V>
where V: MetricsAttributes<T> + 'static, T: 'static,

Source§

type Iter<'a> = Box<dyn Iterator<Item = KeyValue> + 'a>

Source§

fn attributes<'a>(&'a self, t: &'a T) -> Self::Iter<'a>

Source§

impl<V, T, const N: usize> MetricsAttributes<T> for [V; N]
where V: MetricsAttributes<T> + 'static, T: 'static,

Source§

type Iter<'a> = Box<dyn Iterator<Item = KeyValue> + 'a>

Source§

fn attributes<'a>(&'a self, t: &'a T) -> Self::Iter<'a>

Implementors§

Source§

impl<T, F> MetricsAttributes<T> for FnWrapper<F>
where F: Fn(&T) -> Vec<KeyValue> + 'static, T: 'static,

Source§

impl<V, T> MetricsAttributes<T> for KV<V>
where V: Into<Value> + Clone + 'static, T: 'static,