I have the following code that prompts for a color:
enum Color {
Red,
Yellow,
Green,
Blue
}
let color_response: usize = Select::with_theme(&ColorfulTheme::default())
.with_prompt("Color")
.default(0)
.items(/* this takes a slice with strings. what should i put here? */)
.interact()
.unwrap();
let color: Color = // what to put here? should I use a match statement
I am unsure how to properly generate the enum names and index the enum to get the name from it. How can I accomplish this?