Marshaller

org.apache.pekko.http.javadsl.marshalling.Marshaller
See theMarshaller companion object
class Marshaller[-A, +B]

Attributes

Companion
object
Source
Marshaller.scala
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Abstract methods

def apply(value: A)(implicit ec: ExecutionContext): Future[List[Marshalling[B]]]
Implicitly added by asScalaEntityMarshaller

Attributes

Source
Marshaller.scala

Concrete methods

def compose[C](f: C => A): Marshaller[C, B]
Implicitly added by asScalaEntityMarshaller

Attributes

Source
Marshaller.scala
def compose[C](f: Function[C, A]): Marshaller[C, B]

Attributes

Source
Marshaller.scala
def composeWithEC[C](f: ExecutionContext => C => A): Marshaller[C, B]
Implicitly added by asScalaEntityMarshaller

Attributes

Source
Marshaller.scala
def map[C](f: B => C): Marshaller[A, C]
Implicitly added by asScalaEntityMarshaller

Attributes

Source
Marshaller.scala
def map[C](f: Function[B, C]): Marshaller[A, C]

Attributes

Source
Marshaller.scala
def wrap[C, D >: B](newMediaType: MediaType)(f: C => A)(implicit mto: ContentTypeOverrider[D]): Marshaller[C, D]
Implicitly added by asScalaEntityMarshaller

Reuses this Marshaller's logic to produce a new Marshaller from another type C which overrides the pekko.http.scaladsl.model.MediaType of the marshalling result with the given one. Note that not all wrappings are legal. f the underlying pekko.http.scaladsl.model.MediaType has constraints with regard to the charsets it allows the new pekko.http.scaladsl.model.MediaType must be compatible, since pekko-http will never recode entities. If the wrapping is illegal the scala.concurrent.Future produced by the resulting marshaller will contain a RuntimeException.

Reuses this Marshaller's logic to produce a new Marshaller from another type C which overrides the pekko.http.scaladsl.model.MediaType of the marshalling result with the given one. Note that not all wrappings are legal. f the underlying pekko.http.scaladsl.model.MediaType has constraints with regard to the charsets it allows the new pekko.http.scaladsl.model.MediaType must be compatible, since pekko-http will never recode entities. If the wrapping is illegal the scala.concurrent.Future produced by the resulting marshaller will contain a RuntimeException.

Attributes

Source
Marshaller.scala
def wrapWithEC[C, D >: B](newMediaType: MediaType)(f: ExecutionContext => C => A)(implicit cto: ContentTypeOverrider[D]): Marshaller[C, D]
Implicitly added by asScalaEntityMarshaller

Reuses this Marshaller's logic to produce a new Marshaller from another type C which overrides the pekko.http.scaladsl.model.MediaType of the marshalling result with the given one. Note that not all wrappings are legal. f the underlying pekko.http.scaladsl.model.MediaType has constraints with regard to the charsets it allows the new pekko.http.scaladsl.model.MediaType must be compatible, since pekko-http will never recode entities. If the wrapping is illegal the scala.concurrent.Future produced by the resulting marshaller will contain a RuntimeException.

Reuses this Marshaller's logic to produce a new Marshaller from another type C which overrides the pekko.http.scaladsl.model.MediaType of the marshalling result with the given one. Note that not all wrappings are legal. f the underlying pekko.http.scaladsl.model.MediaType has constraints with regard to the charsets it allows the new pekko.http.scaladsl.model.MediaType must be compatible, since pekko-http will never recode entities. If the wrapping is illegal the scala.concurrent.Future produced by the resulting marshaller will contain a RuntimeException.

Attributes

Source
Marshaller.scala

Implicits

Implicits

implicit val asScala: Marshaller[A, B]

Attributes

Source
Marshaller.scala