Struct substrate_prometheus_endpoint::SourcedMetric[][src]

pub struct SourcedMetric<T, S> { /* fields omitted */ }

A metric whose values are obtained from an existing source, instead of being independently recorded.

Implementations

impl<T: SourcedType, S: MetricSource> SourcedMetric<T, S>[src]

pub fn new(opts: &Opts, source: S) -> Result<Self>[src]

Creates a new metric that obtains its values from the given source.

Trait Implementations

impl<T: Clone, S: Clone> Clone for SourcedMetric<T, S>[src]

impl<T: SourcedType, S: MetricSource> Collector for SourcedMetric<T, S>[src]

impl<T: Debug, S: Debug> Debug for SourcedMetric<T, S>[src]

Auto Trait Implementations

impl<T, S> RefUnwindSafe for SourcedMetric<T, S> where
    S: RefUnwindSafe,
    T: RefUnwindSafe
[src]

impl<T, S> Send for SourcedMetric<T, S> where
    S: Send,
    T: Send
[src]

impl<T, S> Sync for SourcedMetric<T, S> where
    S: Sync,
    T: Sync
[src]

impl<T, S> Unpin for SourcedMetric<T, S> where
    S: Unpin,
    T: Unpin
[src]

impl<T, S> UnwindSafe for SourcedMetric<T, S> where
    S: UnwindSafe,
    T: UnwindSafe
[src]

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> Instrument for T[src]

impl<T> Instrument 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.