bitworks/
lib.rs

1//! Crate meant to provide easy to use bitsets, with some out of the box functionality.
2//!
3//! Enable feature `"serde"` to enable `serde::Serialize` and `serde::Deserialize` for most applicable types.
4
5pub mod bitset;
6pub mod bitset128;
7pub mod bitset16;
8pub mod bitset32;
9pub mod bitset64;
10pub mod bitset8;
11pub mod byteset;
12
13pub mod bit;
14pub mod error;
15pub mod index;
16pub mod safety_markers;
17
18/// Prelude.
19pub mod prelude {
20    use super::*;
21
22    pub use bit::Bit::{self, One, Zero};
23
24    pub use bitset::Bitset;
25
26    pub use bitset128::Bitset128;
27    pub use bitset16::Bitset16;
28    pub use bitset32::Bitset32;
29    pub use bitset64::Bitset64;
30    pub use bitset8::Bitset8;
31    pub use byteset::Byteset;
32
33    pub use index::Index;
34
35    /// Alias for [`Index<Bitset8>`][Index].
36    pub type Index8 = Index<Bitset8>;
37    /// Alias for [`Index<Bitset16>`][Index].
38    pub type Index16 = Index<Bitset16>;
39    /// Alias for [`Index<Bitset32>`][Index].
40    pub type Index32 = Index<Bitset32>;
41    /// Alias for [`Index<Bitset64>`][Index].
42    pub type Index64 = Index<Bitset64>;
43    /// Alias for [`Index<Bitset128>`][Index].
44    pub type Index128 = Index<Bitset128>;
45}