[][src]Struct metered::common::ErrorCount

pub struct ErrorCount<C: Counter = AtomicInt<u64>>(_);

A metric counting how many times an expression typed std Result as returned an Err variant.

This is a light-weight metric.

By default, ErrorCount uses a lock-free u64 Counter, which makes sense in multithread scenarios. Non-threaded applications can gain performance by using a std::cell:Cell<u64> instead.

Trait Implementations

impl<C: Counter> Clear for ErrorCount<C>[src]

impl<C: Counter, T, E> Metric<Result<T, E>> for ErrorCount<C>[src]

impl<C: Clone + Counter> Clone for ErrorCount<C>[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl<C: Default + Counter> Default for ErrorCount<C>[src]

impl<C: Debug + Counter> Debug for ErrorCount<C>[src]

impl<C: Counter> Serialize for ErrorCount<C> where
    C: Serialize
[src]

impl<C: Counter> Enter for ErrorCount<C>[src]

type E = ()

The type returned by the enter function and carried to OnResult

impl<C: Counter, T, E> OnResult<Result<T, E>> for ErrorCount<C>[src]

Auto Trait Implementations

impl<C> Send for ErrorCount<C> where
    C: Send

impl<C> Sync for ErrorCount<C> where
    C: Sync

Blanket Implementations

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

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

type Owned = T

impl<T> From for T[src]

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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