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?
Hey, thanks for this crate. I was looking into a lighter alternative to
strumand 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
Displayautomatically derived easily: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
Displayoutput:in which case it would be great if you could just annotate the item in question:
instead of having to drop
EnumDisplayand implementDisplayyourself.Is this something you'd consider adding to the crate?