-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
It would be beneficial to me to be able to define an extra variant of my enum which is used in the FromStr impl when none of the other variants match.
For example,
#[derive(FromStr)]
enum Fruit {
#[display("appl")]
Apple,
#[display("orng")]
Orange,
#[else] // Not sure about naming of this attribute?
Other(String),
}
If you aren't opposed to the idea, I would like to try adding this feature. Also, if anyone has any good naming ideas that would be appreciated.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels