This trait provides an instance of QueryStringBindable for an enumeration.
Unlike QueryStringConverters, the QueryStringBindable instance created by
this trait treats the input as a number using the Int representation of the
enumeration. It works by extending the companion object of the enumeration class.
@enum class Digit {
Zero
One
Two
Three
Four
Five
Six
Seven
Eight
Nine
}
object Digit extends QueryStringNumericConverters[Digit]
This trait provides an instance of
QueryStringBindable
for an enumeration. UnlikeQueryStringConverters
, theQueryStringBindable
instance created by this trait treats the input as a number using theInt
representation of the enumeration. It works by extending the companion object of the enumeration class.