Crate width_counters
source ·Expand description
Atomic, thread-safe counters of differing integer widths
§Comes with
These counters support
- Incrementing/decrementing by default (1) or specified amounts,
- Using per-operation atomic orderings, (see this also)
- Instantiation with default offset (0) and default atomic ordering ( sequentially consistent ),
- Instantiation with custom offset, custom ordering or both,
- Instantiation with custom enum-flag-based counting behaviors (monotonic, nonmonotonic, incrementing, decrementing, cyclic, acyclic)
- PartialEq, Eq, Hash, PartialOrd, Ord, Clone, Debug, Display
- Send, Sync
§Optional features
serde
: serialization and deserialization supportiterators
: iterator support
Modules§
- Counter behavioral elements
Structs§
- An atomic counter using AtomicIsize / (core::isize).
- An atomic counter using AtomicUsize / (core::usize).
- An iterator over the variants of Self
Enums§
- Counting behaviors
- A conflict between counting behaviors
Traits§
- Something that can counts up or down
- Something that has counting behaviors
- Something that is a counter