This trait provides an instance of PathBindable for an enumeration.
Unlike PathConverters, the PathBindable 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 PathNumericConverters[Digit]
This trait provides an instance of
PathBindable
for an enumeration. UnlikePathConverters
, thePathBindable
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.