[][src]Crate global_counter

This is a minimal library implementing global, thread-safe counters.

This library re-exports lazy_static::*, required by technicalities.

Modules

generic

This module contains a generic, thread-safe counter and the accompanying Inc trait.

primitive

This module contains atomic counters for primitive integer types.

Macros

global_counter

Creates a new generic, global counter, starting from the given value.

global_default_counter

Creates a new generic, global counter, starting from its (inherited) default value.

lazy_static

Traits

LazyStatic

Support trait for enabling a few common operation on lazy static values.

__Deref

Used for immutable dereferencing operations, like *v.

Functions

initialize

Takes a shared reference to a lazy static and initializes it if it has not been already.