integral-enum
Procedural macro for easy integer-like enums definition
Usage
use integral_enum;
// Discriminant will be automatically determined based on the variants count (from u8 to u64).
// After macro expansion repr will be added automatically
// #[repr(u8)]
// But discriminant type can be defined manually.
// Same here
// #[repr(u64)]
// integral_enum derives the following traits automatically: Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord.
// And additionally creates implementation for the TryFrom trait:
assert_eq!;
assert_eq!;
assert_eq!;
assert_eq!;
assert_eq!;
assert_eq1;