class Parsing[A] extends QueryStringBindable[A]
A helper class for creating QueryStringBindables to map the value of a single key
- A
the type being parsed
- Source
- Binders.scala
- Alphabetic
- By Inheritance
- Parsing
- QueryStringBindable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
Parsing(parse: (String) ⇒ A, serialize: (A) ⇒ String, error: (String, Exception) ⇒ String)
- parse
a function to parse the param value
- serialize
a function to serialize and URL-encode the param value. Remember to encode arbitrary strings, for example using URLEncoder.encode.
- error
a function for rendering an error message if an error occurs
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
bind(key: String, params: Map[String, Seq[String]]): Option[Either[String, A]]
Bind a query string parameter.
Bind a query string parameter.
- key
Parameter key
- params
QueryString data
- returns
None
if the parameter was not present in the query string data. Otherwise, returnsSome
of eitherRight
of the parameter value, orLeft
of an error message if the binding failed.
- Definition Classes
- Parsing → QueryStringBindable
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
javascriptUnbind: String
Javascript function to unbind in the Javascript router.
Javascript function to unbind in the Javascript router.
- Definition Classes
- QueryStringBindable
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
transform[B](toB: (A) ⇒ B, toA: (B) ⇒ A): QueryStringBindable[B]
Transform this QueryStringBindable[A] to QueryStringBindable[B]
Transform this QueryStringBindable[A] to QueryStringBindable[B]
- Definition Classes
- QueryStringBindable
-
def
unbind(key: String, value: A): String
Unbind a query string parameter.
Unbind a query string parameter.
- key
Parameter key
- value
Parameter value.
- returns
a query string fragment containing the key and its value. E.g. "foo=42"
- Definition Classes
- Parsing → QueryStringBindable
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )