Load = 0x1,
Dynamic = 0x2,
Interp = 0x3,
Note = 0x4,
}
impl_parse_for_enum!(SegmentType, le_u32);
We’ll only need one additional trick - just like we used derive-try-from-primitive for enums, we’ll use enumflags2 for bitflags for which each flag is an enum variant.
$ cd delf/
$ cargo add [email protected]
Adding enumflags2 v0.6