pub struct AsyncMetricBatch { /* private fields */ }
Expand description
Batched metric updates for async contexts
Implementations§
Source§impl AsyncMetricBatch
impl AsyncMetricBatch
Sourcepub fn counter_inc(&mut self, name: &'static str, value: u64)
pub fn counter_inc(&mut self, name: &'static str, value: u64)
Add counter increment
Sourcepub fn timer_record(&mut self, name: &'static str, nanos: u64)
pub fn timer_record(&mut self, name: &'static str, nanos: u64)
Add timer recording
Sourcepub fn flush(self, metrics: &MetricsCore)
pub fn flush(self, metrics: &MetricsCore)
Flush all updates to metrics
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AsyncMetricBatch
impl RefUnwindSafe for AsyncMetricBatch
impl Send for AsyncMetricBatch
impl Sync for AsyncMetricBatch
impl Unpin for AsyncMetricBatch
impl UnwindSafe for AsyncMetricBatch
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