Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: