pub trait MetricsExt: Metrics {
// Provided methods
fn counter<N: Into<String>, H: Into<String>>(
&self,
name: N,
help: H,
) -> Counter { ... }
fn gauge<N: Into<String>, H: Into<String>>(&self, name: N, help: H) -> Gauge { ... }
fn histogram<N: Into<String>, H: Into<String>, I>(
&self,
name: N,
help: H,
buckets: I,
) -> Histogram
where I: IntoIterator<Item = f64> { ... }
fn family<N, H, S, M>(&self, name: N, help: H) -> Registered<Family<S, M>>
where N: Into<String>,
H: Into<String>,
S: Clone + Hash + Eq,
M: Default,
Family<S, M>: Metric { ... }
}Expand description
One-line constructors for the common metric types.
Provided Methods§
Sourcefn counter<N: Into<String>, H: Into<String>>(&self, name: N, help: H) -> Counter
fn counter<N: Into<String>, H: Into<String>>(&self, name: N, help: H) -> Counter
Register a counter with the runtime.
Sourcefn gauge<N: Into<String>, H: Into<String>>(&self, name: N, help: H) -> Gauge
fn gauge<N: Into<String>, H: Into<String>>(&self, name: N, help: H) -> Gauge
Register a gauge with the runtime.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".