Trait mas_tower::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>

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

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

§

type Iter<'a> = Empty<KeyValue>

source§

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

source§

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

§

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,

§

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,

§

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,

§

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,

§

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,

§

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,

§

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,

§

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,

§

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,

§

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,

§

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

source§

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

source§

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

§

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

source§

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

source§

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

§

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

source§

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

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,

§

type Iter<'a> = Once<KeyValue>