[−][src]Macro sunrise_kernel::utils::enum_with_val
Creates a fake C-like enum, where all bit values are accepted.
This is mainly useful for FFI constructs. In C, an enum is allowed to take any bit value, not just those defined in the enumeration. In Rust, constructing an enum with a value outside the enumeration is UB. In order to avoid this, we define our enum as a struct with associated variants.