Struct libcantal::Counter
[−]
[src]
pub struct Counter { /* fields omitted */ }
A kind of metric (Value
) that exports ever-increasing counter
Methods
impl Counter
[src]
fn new() -> Counter
[src]
Create a new counter
Note you need to export it in a collection to make it visible for cantal agent
fn incr(&self, val: u64)
[src]
Increase a counter for val
fn get(&self) -> u64
[src]
Get current value for counter
Note it works regardless of whether it's attached to a value
Trait Implementations
impl Display for Counter
[src]
fn fmt(&self, fmt: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more