pub struct MetricsRegistry { /* private fields */ }Expand description
Thread-safe metrics registry.
Implementations§
Source§impl MetricsRegistry
impl MetricsRegistry
Sourcepub fn counter(
&self,
name: &'static str,
help: &'static str,
labels: &[(&'static str, &'static str)],
) -> CounterHandle
pub fn counter( &self, name: &'static str, help: &'static str, labels: &[(&'static str, &'static str)], ) -> CounterHandle
Register a new counter and return a handle.
Sourcepub fn gauge(
&self,
name: &'static str,
help: &'static str,
initial: f64,
) -> GaugeHandle
pub fn gauge( &self, name: &'static str, help: &'static str, initial: f64, ) -> GaugeHandle
Register a new gauge and return a handle.
Trait Implementations§
Source§impl Default for MetricsRegistry
impl Default for MetricsRegistry
Source§fn default() -> MetricsRegistry
fn default() -> MetricsRegistry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for MetricsRegistry
impl !RefUnwindSafe for MetricsRegistry
impl Send for MetricsRegistry
impl Sync for MetricsRegistry
impl Unpin for MetricsRegistry
impl UnsafeUnpin for MetricsRegistry
impl UnwindSafe for MetricsRegistry
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