Expand description
bitmap32 is a library that provides the BitMap
type and the BitSlice
which are wrappers around slices and arrays.
bitmap32 can be used without the std
and or alloc
features for use in a no-std
environment
let mut map = BitMap::<u8, 2>([0b11001001, 0b11000000]);
assert_eq!(map.test(4), Some(true));
assert_eq!(map.test(10), Some(false));
assert_eq!(map.set_checked(5), true);
assert_eq!(map.test(5), Some(true));
let mut map = BitMap::<u8, 2>::new();
map.set_checked(14);
assert_eq!(map.ones().next(), Some(14));
Re-exports
pub use crate::slice::BitSlice;
Modules
Structs
- A bitmap that is internally represented as
[B; BLOCKS]
. BitBlock
s that use Little Endian order instead of Big Endian Order.
Traits
- Represents a copyable container of bits (usually an unsigned integer).