Backend
6 min read
Looping Through Enum Variants in Rust Using strum
Rust enums are incredibly powerful for modeling data, but newcomers quickly discover a frustrating limitation: you cannot iterate through enum variants natively. We will show you exactly how to use strum to iterate through enum variants, convert enums to strings, parse strings back to enums, and leverage other powerful features that make working with enums much more pleasant.
6/5/2025