-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers
Description
Hey, thanks for this crate. I was looking into a lighter alternative to strum
and came across it, but I think it's missing one important feature that comes in quite handy (or else I didn't see how to do it in the docs).
It's common to have an enum that can have its Display
automatically derived easily:
#[derive(EnumDisplay)]
enum Foo {
Fox,
Hen,
}
but then later on to end up with a member that doesn't lend itself to a direct one-to-one mapping between its textual representation and the desired Display
output:
#[derive(EnumDisplay)]
enum Foo {
Fox,
Hen,
FoxHound,
}
in which case it would be great if you could just annotate the item in question:
#[derive(EnumDisplay)]
enum Foo {
Fox,
Hen,
#[display("Fox Hound")]
FoxHound,
}
instead of having to drop EnumDisplay
and implement Display
yourself.
Is this something you'd consider adding to the crate?
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers