-
-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Following on from #41 (comment)
Maybe one way to easily map from abbrev
strings to a parameter
enum variant is that I could try to implement a FromAbbrevStr
procedural derive macro. This macro would implement the FromStr
trait. And then I could add #[derive(FromAbbrevStr)]
to every enum in gribberish::templates::product::parameters::*
. Does that sounds like a good way to go?
For example, calling TemperatureProduct::from_str("TMP")
would return TemperatureProduct::Temperature
.
Metadata
Metadata
Assignees
Labels
No labels