enumeratum.values.CharPlayPathBindableValueEnum
Path Bindable implicits for CharEnum
Attributes
-
Graph
-
-
Supertypes
-
class Object
trait Matchable
class Any
-
Known subtypes
-
-
Self type
-
Members list
Binder for play.api.routing.sird router
Binder for play.api.routing.sird router
Example:
scala> import play.api.routing.sird._
scala> import play.api.routing._
scala> import play.api.mvc._
scala> sealed abstract class Greeting(val value: Int) extends IntEnumEntry
scala> object Greeting extends IntPlayEnum[Greeting] {
| val values = findValues
| case object Hello extends Greeting(1)
| case object GoodBye extends Greeting(2)
| case object Hi extends Greeting(3)
| case object Bye extends Greeting(4)
| }
scala> val router = Router.from {
| case GET(p"/hello/${Greeting.fromPath(greeting)}") => Action {
| Results.Ok(s"$greeting")
| }
| }
scala> router.routes
res0: Router.Routes = <function1>
Attributes
-
Inherited from:
-
PlayPathBindableValueEnum
Implicit path binder for Play's default router
Implicit path binder for Play's default router
Attributes