I have an enum where it’d be nice to be able to iterate over all the static elements of the enum. I found an old Reddit thread about this, but it’s 2 years old. Is there a current best practices for providing an iterator for an enum, either through a macro or manually?
On a related note, I’d like to expand this enum so that it differs by platform. I’d like to do that but I wanted to check if that’s considered a bad practice by the Rust community.