Login
From:
Corrode Rust Consulting
(Uncensored)
subscribe
Using Enums to Represent State | corrode Rust Consulting
https://corrode.dev/blog/enums/
links
backlinks
Roast topics
Find topics
Find it!
Many Rust beginners with a background in systems programming tend to use bool (or even u8 – an 8-bit unsigned integer type) to represent “state”. For example, how about a bool to indicate whet…