1 mod example { 2 use bitflags::bitflags; 3 4 bitflags! { 5 pub struct Flags1: u32 { 6 const FLAG_A = 0b00000001; 7 } 8 9 struct Flags2: u32 { 10 const FLAG_B = 0b00000010; 11 } 12 } 13 } 14 main()15 fn main() { 16 let flag1 = example::Flags1::FLAG_A; 17 let flag2 = example::Flags2::FLAG_B; 18 } 19