traitShortConverters[Enum] extends AsShort[Enum] with FromShort[Enum]
This trait provides the Short/Enum conversions from AsShort and FromShort.
As with those traits you must extend the companion object of the enumeration.
@enum class Color {
Red
Blue
Yellow
}
object Color extends ShortConverters[Color]
This trait provides the
Short
/Enum
conversions fromAsShort
andFromShort
. As with those traits you must extend the companion object of the enumeration.