-
Notifications
You must be signed in to change notification settings - Fork 143
Open
Description
Hi, I was hoping I would be able to generate bitwise operations for my struct, but I noticed that it doesn't appear to be possible to use Add for structs with booleans. Of course bool doesn't implement Add or Sub, so perhaps it could be possible to have a subset of bitwise traits?
#[derive(Bitwise)]
struct Flags {
flag_one: bool,
flag_two: bool,
}
let a: Flags = Flags { flag_one: true, flag_two: false };
let b: Flags = Flags { flag_one: false, flag_two: true };
let c = a | b;
let d = a ^ b;
let e = a & b;Metadata
Metadata
Assignees
Labels
No labels