Trait Number

Source
pub trait Number {
    // Required methods
    fn add(&self, value: u64);
    fn get(&self) -> u64;
}

Required Methods§

Source

fn add(&self, value: u64)

Source

fn get(&self) -> u64

Implementations on Foreign Types§

Source§

impl Number for IntCounter

§Example

use prometheus::register_int_counter;
use turn_server::statistics::{prometheus::*, Number};

let count = register_int_counter!("test", "test").unwrap();

count.add(1);
assert_eq!(count.get(), 1);

count.add(1);
assert_eq!(count.get(), 2);
Source§

fn add(&self, value: u64)

Source§

fn get(&self) -> u64

Implementors§