[][src]Struct metered::ErrorCount

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

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: Clone + Counter> Clone for ErrorCount<C>[src]

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

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

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

type Target = C

The resulting type after dereferencing.

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> Metric<Result<T, E>> for ErrorCount<C>[src]

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

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

Auto Trait Implementations

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

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

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

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

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

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.