[][src]Struct prometheus::HistogramTimer

#[must_use = "Timer should be kept in a variable otherwise it cannot observe duration"]
pub struct HistogramTimer { /* fields omitted */ }

A struct represents an event being timed. When the timer goes out of scope, the duration will be observed, or call observe_duration to manually observe.

NOTICE: A timer can be observed only once (automatically or manually).

Methods

impl HistogramTimer
[src]

pub fn observe_duration(self)
[src]

observe_duration observes the amount of time in seconds since Histogram.start_timer was called.

Trait Implementations

impl Drop for HistogramTimer
[src]

Auto Trait Implementations

Blanket Implementations

impl<T> From for T
[src]

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

impl<T, U> TryFrom for T where
    T: From<U>, 
[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> BorrowMut 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]