Rust has an exciting concept of enumeration types, which is much more powerful than enums in other languages. Notably C has the weakest type of enum, since there’s no type checking of any kind, and enum values can be used interchangeably with integers:
:::c
enum JobState {
PENDING,
STARTED,
FAILED,
COMPLETED
};
You can opt for manually assigning integers instead of leaving this to the compiler, but that’s about it.