Quick Note: Assigning Values to Enum Keys in Rust
"Quick Note" is my blog series which I keep quick logs of what I have learned today and document it. So, it naturally does not reflect the best practice.
We use enums to represent a case of type, of which we define there will be limited set of seman...
erayerdin.com
j
stuff ;)
I see a similar pattern non localized where the value mapping is basically not implemented but 'resolved' by a static function. I think from a point of code cohesion your solution makes a lot of sense.