pub struct HistogramTimer(/* private fields */);Implementations§
Source§impl HistogramTimer
impl HistogramTimer
Sourcepub fn stop_and_record(self) -> f64
pub fn stop_and_record(self) -> f64
Records the elapsed time and returns it; prevents the Drop impl
from recording a second time.
Sourcepub fn observe_duration(self)
pub fn observe_duration(self)
Records the duration; provided for compatibility with older prometheus APIs.
Sourcepub fn stop_and_discard(self) -> f64
pub fn stop_and_discard(self) -> f64
Discards the timer without recording; returns the elapsed seconds.
Trait Implementations§
Source§impl Debug for HistogramTimer
impl Debug for HistogramTimer
Auto Trait Implementations§
impl Freeze for HistogramTimer
impl RefUnwindSafe for HistogramTimer
impl Send for HistogramTimer
impl Sync for HistogramTimer
impl Unpin for HistogramTimer
impl UnsafeUnpin for HistogramTimer
impl UnwindSafe for HistogramTimer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more