GenericUnmarshallers
org.apache.pekko.http.scaladsl.unmarshalling.GenericUnmarshallers
trait GenericUnmarshallers extends LowerPriorityGenericUnmarshallers
Attributes
- Source
- GenericUnmarshallers.scala
- Graph
-
- Supertypes
- Known subtypes
-
object Unmarshaller
Members list
Implicits
Implicits
implicit def liftToTargetOptionUnmarshaller[A, B](um: Unmarshaller[A, B]): Unmarshaller[A, Option[B]]
Attributes
- Source
- GenericUnmarshallers.scala
implicit def targetOptionUnmarshaller[A, B](implicit um: Unmarshaller[A, B]): Unmarshaller[A, Option[B]]
Attributes
- Source
- GenericUnmarshallers.scala
Inherited implicits
implicit def eitherUnmarshaller[L, R](implicit ua: FromEntityUnmarshaller[L], rightTag: ClassTag[R], ub: FromEntityUnmarshaller[R], leftTag: ClassTag[L]): FromEntityUnmarshaller[Either[L, R]]
Enables using Either to encode the following unmarshalling logic: Attempt unmarshalling the entity as as R first (yielding R), and if it fails attempt unmarshalling as L (yielding Left).
Enables using Either to encode the following unmarshalling logic: Attempt unmarshalling the entity as as R first (yielding R), and if it fails attempt unmarshalling as L (yielding Left).
The either unmarshaller only works with strict entities, so make sure to wrap routes that want to use it with toStrictEntity. Otherwise, if a non-strict entity is provided, it will fail with an IllegalArgumentException.
Note that the Either's "R" type will be attempted first (as Left is often considered as the "failed case" in Either).
Attributes
- Inherited from:
- LowerPriorityGenericUnmarshallers
- Source
- GenericUnmarshallers.scala
implicit def liftToSourceOptionUnmarshaller[A, B](um: Unmarshaller[A, B]): Unmarshaller[Option[A], B]
Attributes
- Inherited from:
- LowerPriorityGenericUnmarshallers
- Source
- GenericUnmarshallers.scala
implicit def messageUnmarshallerFromEntityUnmarshaller[T](implicit um: FromEntityUnmarshaller[T]): FromMessageUnmarshaller[T]
Attributes
- Inherited from:
- LowerPriorityGenericUnmarshallers
- Source
- GenericUnmarshallers.scala
implicit def sourceOptionUnmarshaller[A, B](implicit um: Unmarshaller[A, B]): Unmarshaller[Option[A], B]
Attributes
- Inherited from:
- LowerPriorityGenericUnmarshallers
- Source
- GenericUnmarshallers.scala
In this article