macro_rules! register_counter {
    (@of_type $TYPE:ident, $OPTS:expr) => { ... };
    ($OPTS:expr $(,)?) => { ... };
    ($NAME:expr, $HELP:expr $(,)?) => { ... };
}
Expand description

Create a Counter and registers to default registry.

Examples

let opts = opts!("test_macro_counter_1", "help");
let res1 = register_counter!(opts);
assert!(res1.is_ok());

let res2 = register_counter!("test_macro_counter_2", "help");
assert!(res2.is_ok());