indexed_bitfield/lib.rs
1//! This crate is a simple bitfield that can be used to track presence or
2//! absence of elements in a known collection of a specified size.
3//!
4//! Under the hood it uses unsigned integers. The bits represent presence of
5//! absence of elements. No reference to a collection is made explicitly.
6
7// #![warn(clippy::pedantic, missing_docs)]
8#![allow(clippy::module_name_repetitions)]
9
10mod bitfield;
11mod index;
12mod indexed_bitfield;
13mod size;
14
15pub use bitfield::BitField;
16pub use index::BitFieldIndex;
17pub use indexed_bitfield::IndexedBitField;
18pub use size::BitFieldSize;
19
20/// Type alias for an `IndexedBitField` with at most 8 items.
21pub type IndexedBitField8 = IndexedBitField<u8>;
22
23/// Type alias for an `IndexedBitField` with at most 16 items.
24pub type IndexedBitField16 = IndexedBitField<u16>;
25
26/// Type alias for an `IndexedBitField` with at most 32 items.
27pub type IndexedBitField32 = IndexedBitField<u32>;
28
29/// Type alias for an `IndexedBitField` with at most 64 items.
30pub type IndexedBitField64 = IndexedBitField<u64>;
31
32/// Type alias for an `IndexedBitField` with at most 128 items.
33pub type IndexedBitField128 = IndexedBitField<u128>;