[−][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
pub fn new(val: Self::T) -> Self
[src]
Create a new atomic value.
pub fn set(&self, val: Self::T)
[src]
Set the value to the provided value.
pub fn get(&self) -> Self::T
[src]
Get the value.
pub fn inc_by(&self, delta: Self::T)
[src]
Increment the value by a given amount.
pub fn dec_by(&self, delta: Self::T)
[src]
Decrement the value by a given amount.