Packages

object Marshaller

Source
Marshaller.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Marshaller
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. implicit def asScalaEntityMarshaller[T](m: Marshaller[T, RequestEntity]): scaladsl.marshalling.Marshaller[T, RequestEntity]
  2. implicit def asScalaToResponseMarshaller[T](m: Marshaller[T, HttpResponse]): ToResponseMarshaller[T]
  3. def byteArrayToEntity: Marshaller[Array[Byte], RequestEntity]
  4. def byteStringMarshaller(t: ContentType): Marshaller[ByteString, RequestEntity]
  5. def byteStringToEntity: Marshaller[ByteString, RequestEntity]
  6. def charArrayToEntity: Marshaller[Array[Char], RequestEntity]
  7. def downcast[A, B1, B2 <: B1](m: Marshaller[A, B2], target: Class[B1]): Marshaller[A, B1]

    Safe downcasting of the output type of the marshaller to a superclass.

    Safe downcasting of the output type of the marshaller to a superclass.

    Marshaller is covariant in B, i.e. if B2 is a subclass of B1, then Marshaller[X,B2] is OK to use where Marshaller[X,B1] is expected.

  8. def downcast[A, B1, B2 <: B1](m: Marshaller[A, B2]): Marshaller[A, B1]

    Safe downcasting of the output type of the marshaller to a superclass.

    Safe downcasting of the output type of the marshaller to a superclass.

    Marshaller is covariant in B, i.e. if B2 is a subclass of B1, then Marshaller[X,B2] is OK to use where Marshaller[X,B1] is expected.

  9. def entityToOKResponse[A](headers: Iterable[HttpHeader], m: Marshaller[A, _ <: RequestEntity]): Marshaller[A, HttpResponse]
  10. def entityToOKResponse[A](m: Marshaller[A, _ <: RequestEntity]): Marshaller[A, HttpResponse]
  11. def entityToResponse[A](status: StatusCode, headers: Iterable[HttpHeader], m: Marshaller[A, _ <: RequestEntity]): Marshaller[A, HttpResponse]
  12. def entityToResponse[A, R <: RequestEntity](status: StatusCode, m: Marshaller[A, R]): Marshaller[A, HttpResponse]
  13. def formDataToEntity: Marshaller[FormData, RequestEntity]
  14. def fromScala[A, B](scalaMarshaller: scaladsl.marshalling.Marshaller[A, B]): Marshaller[A, B]
  15. def oneOf[A, B](m1: Marshaller[A, B], m2: Marshaller[A, B], m3: Marshaller[A, B], m4: Marshaller[A, B], m5: Marshaller[A, B]): Marshaller[A, B]

    Helper for creating a "super-marshaller" from a number of "sub-marshallers".

    Helper for creating a "super-marshaller" from a number of "sub-marshallers". Content-negotiation determines, which "sub-marshaller" eventually gets to do the job.

    Please note that all marshallers will actually be invoked in order to get the Marshalling object out of them, and later decide which of the marshallings should be returned. This is by-design, however in ticket as discussed in ticket https://github.com/akka/akka-http/issues/243 it MAY be changed in later versions of Pekko HTTP.

  16. def oneOf[A, B](m1: Marshaller[A, B], m2: Marshaller[A, B], m3: Marshaller[A, B], m4: Marshaller[A, B]): Marshaller[A, B]

    Helper for creating a "super-marshaller" from a number of "sub-marshallers".

    Helper for creating a "super-marshaller" from a number of "sub-marshallers". Content-negotiation determines, which "sub-marshaller" eventually gets to do the job.

    Please note that all marshallers will actually be invoked in order to get the Marshalling object out of them, and later decide which of the marshallings should be returned. This is by-design, however in ticket as discussed in ticket https://github.com/akka/akka-http/issues/243 it MAY be changed in later versions of Pekko HTTP.

  17. def oneOf[A, B](m1: Marshaller[A, B], m2: Marshaller[A, B], m3: Marshaller[A, B]): Marshaller[A, B]

    Helper for creating a "super-marshaller" from a number of "sub-marshallers".

    Helper for creating a "super-marshaller" from a number of "sub-marshallers". Content-negotiation determines, which "sub-marshaller" eventually gets to do the job.

    Please note that all marshallers will actually be invoked in order to get the Marshalling object out of them, and later decide which of the marshallings should be returned. This is by-design, however in ticket as discussed in ticket https://github.com/akka/akka-http/issues/243 it MAY be changed in later versions of Pekko HTTP.

  18. def oneOf[A, B](m1: Marshaller[A, B], m2: Marshaller[A, B]): Marshaller[A, B]

    Helper for creating a "super-marshaller" from a number of "sub-marshallers".

    Helper for creating a "super-marshaller" from a number of "sub-marshallers". Content-negotiation determines, which "sub-marshaller" eventually gets to do the job.

    Please note that all marshallers will actually be invoked in order to get the Marshalling object out of them, and later decide which of the marshallings should be returned. This is by-design, however in ticket as discussed in ticket https://github.com/akka/akka-http/issues/243 it MAY be changed in later versions of Pekko HTTP.

  19. def oneOf[A, B](ms: Marshaller[A, B]*): Marshaller[A, B]

    Helper for creating a "super-marshaller" from a number of "sub-marshallers".

    Helper for creating a "super-marshaller" from a number of "sub-marshallers". Content-negotiation determines, which "sub-marshaller" eventually gets to do the job.

    Please note that all passed in marshallers will actually be invoked in order to get the Marshalling object out of them, and later decide which of the marshallings should be returned. This is by-design, however in ticket as discussed in ticket https://github.com/akka/akka-http/issues/243 it MAY be changed in later versions of Pekko HTTP.

  20. def opaque[A, B](f: Function[A, B]): Marshaller[A, B]

    Helper for creating a synchronous Marshaller to non-negotiable content from the given function.

  21. def optionMarshaller[A](m: Marshaller[A, RequestEntity]): Marshaller[Optional[A], RequestEntity]

    Marshals an Optional[A] to a RequestEntity an empty optional will yield an empty entity.

  22. def stringToEntity: Marshaller[String, RequestEntity]
  23. def toOption[T](opt: Optional[T]): Option[T]
  24. def withFixedContentType[A, B](contentType: ContentType, f: Function[A, B]): Marshaller[A, B]

    Helper for creating a synchronous Marshaller to content with a fixed charset from the given function.

  25. def withOpenCharset[A, B](mediaType: WithOpenCharset, f: BiFunction[A, HttpCharset, B]): Marshaller[A, B]

    Helper for creating a synchronous Marshaller to content with a negotiable charset from the given function.

  26. def wrapEntity[A, C, E <: RequestEntity](f: Function[C, A], m: Marshaller[A, E], mediaType: MediaType): Marshaller[C, RequestEntity]
  27. def wrapEntity[A, C](f: BiFunction[ExecutionContext, C, A], m: Marshaller[A, RequestEntity], mediaType: MediaType): Marshaller[C, RequestEntity]