Can I have a tuple as value in enums? Basically I want this in order to use an integer value as a database input and a string value as a friendly response to a UI caller.
For example:
#[derive(Deserialize, Debug)]
enum MyTestType {
A(0, "Default"),
B(1, "something else"),
C(18, "18"),
D(4, "D")
}
I am using serde crate in rust and it would be convenient to have it in order to avoid a struct here