https://doc.rust-lang.org/bitflags/bitflags/index.html
That would already be a good improvement, both in terms of DRY and readability, without the need of adding another dependency.
https://doc.rust-lang.org/bitflags/bitflags/index.html