[−][src]Trait prometheus::core::Atomic
An interface for atomics. Used to generically model float metrics and integer metrics, i.e.
Counter
and IntCounter
.
Associated Types
Loading content...Required methods
fn new(val: Self::T) -> Self
Create a new atomic value.
fn set(&self, val: Self::T)
Set the value to the provided value.
fn get(&self) -> Self::T
Get the value.
fn inc_by(&self, delta: Self::T)
Increment the value by a given amount.
fn dec_by(&self, delta: Self::T)
Decrement the value by a given amount.