[−][src]Macro global_counter::global_counter
Creates a new generic, global counter, starting from the given value.
This macro is exported at the crates top-level.
Example
type CountedType = u32; fn main(){ const start_value : u32 = 0; global_counter!(COUNTER_NAME, CountedType, start_value); assert_eq!(COUNTER_NAME.get_cloned(), 0); COUNTER_NAME.inc(); assert_eq!(COUNTER_NAME.get_cloned(), 1); }