Loose Enum
A macro for defining loose repr enums.
When parsing userdata, you often have known/supported cases; however, users don't always follow the rules.
One way to solve this is having a backup Undefined case that supports any value. This crate hopes to simplify this process.
Example:
For example, an integer repr bool, with 0 being false and 1 being true would look something like this:
loose_enum!
Which expands into the following:
// If feature flag `serde` is enabled: