traitStringConverters[Enum] extends AsString[Enum] with FromString[Enum]
This trait provides the String/Enum conversions from AsString and FromString.
As with those traits you must extend the companion object of the enumeration.
@enum class Color {
Red
Blue
Yellow
}
object Color extends StringConverters[Color]
This trait provides the
String
/Enum
conversions fromAsString
andFromString
. As with those traits you must extend the companion object of the enumeration.