Re:Using enums to represent state in Rust
by the__alchemist on Friday September 22, 2023 @09:16AM
(#37611632)
Adding to the section on the end about deserializing an integer to enum: The `num-enum crate` (https://docs.rs/num_enum/latest/num_enum/) it great for that. I make heavy use of the `repr()` and `TryFromPrimitive` for [de]serializing data to/from byte arrays for IO.
[ Parent
| on HN ]
There are no comments on this comment yet.