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:
enum JobState {
PENDING,
STARTED,
FAILED,
COMPLETED …