width_counters/
lib.rs

1//! Atomic, thread-safe counters of differing integer widths
2//!
3//! ### Comes with
4//! These counters support
5//! - Incrementing/decrementing by default (1) or specified amounts,  
6//! - Using per-operation [atomic orderings](::core::sync::atomic::Ordering), ([see this also](https://en.cppreference.com/w/c/atomic/memory_order))  
7//! - Instantiation with default offset (0) and default atomic ordering ( sequentially consistent ),  
8//! - Instantiation with custom offset, custom ordering or both, 
9//! - Instantiation with custom enum-flag-based counting behaviors (monotonic, nonmonotonic, incrementing, decrementing, cyclic, acyclic)  
10//! - [PartialEq], [Eq], [Hash](core::hash::Hash), [PartialOrd], [Ord], [Clone], [Debug](core::fmt::Debug), [Display](core::fmt::Display)  
11//! - [Send], [Sync]
12//! ### Optional features
13//! - `serde`: serialization and deserialization support
14//! - `iterators`: iterator support
15
16
17#![no_std]
18
19mod counter;
20pub use counter::*;
21#[cfg(feature = "iterators")]
22mod iterators;
23#[cfg(feature = "iterators")]
24pub use iterators::*;