Struct stats::PrometheusRegistry
source · [−]pub struct PrometheusRegistry { /* private fields */ }
Implementations
sourceimpl PrometheusRegistry
impl PrometheusRegistry
sourcepub fn register_counter(&mut self, name: &str, help: &str, value: i64)
pub fn register_counter(&mut self, name: &str, help: &str, value: i64)
Adds a new prometheus counter with the specified value
sourcepub fn register_gauge(&mut self, name: &str, help: &str, value: i64)
pub fn register_gauge(&mut self, name: &str, help: &str, value: i64)
Adds a new prometheus gauge with the specified gauge
sourcepub fn register_optime<F: Fn() -> T, T>(&mut self, name: &str, f: &F) -> T
pub fn register_optime<F: Fn() -> T, T>(&mut self, name: &str, f: &F) -> T
Adds a new prometheus counter with the time spent in running the specified function
Auto Trait Implementations
impl !RefUnwindSafe for PrometheusRegistry
impl Send for PrometheusRegistry
impl Sync for PrometheusRegistry
impl Unpin for PrometheusRegistry
impl !UnwindSafe for PrometheusRegistry
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more