using_bitmap_arch/
using_bitmap_arch.rs1use fixed_bitmaps::BitmapArch;
2
3fn main() {
4 let mut bitmap = BitmapArch::default();
5 println!("{}", bitmap);
6 bitmap.set(5, true).unwrap();
9 println!("{}", bitmap);
10 println!("Value: {}", bitmap.to_usize());
11
12 let a = BitmapArch::from(0b0001);
13 let b = BitmapArch::from(0b0010);
14 let c = BitmapArch::from(0b0100);
15 let d = BitmapArch::from(0b1000);
16
17 let set1 = a | b | c | d | d;
18 let set2 = a | b | c | d;
19
20 println!("Set 1: {}", set1);
21 println!("Set 2: {:?}", set2);
22}