Class Marshalling.WithFixedContentType<A>

java.lang.Object
akka.http.scaladsl.marshalling.Marshalling.WithFixedContentType<A>
All Implemented Interfaces:
Marshalling<A>, Serializable, scala.Equals, scala.Product
Enclosing interface:
Marshalling<A>

public static final class Marshalling.WithFixedContentType<A> extends Object implements Marshalling<A>, scala.Product, Serializable
A Marshalling to a specific ContentType.
See Also:
  • Constructor Details

    • WithFixedContentType

      public WithFixedContentType(ContentType contentType, scala.Function0<A> marshal)
  • Method Details

    • contentType

      public ContentType contentType()
    • marshal

      public scala.Function0<A> marshal()
    • map

      public <B> Marshalling.WithFixedContentType<B> map(scala.Function1<A,B> f)
      Specified by:
      map in interface Marshalling<A>
    • toOpaque

      public Marshalling<A> toOpaque(HttpCharset charset)
      Description copied from interface: Marshalling
      Converts this marshalling to an opaque marshalling, i.e. a marshalling result that does not take part in content type negotiation. The given charset is used if this instance is a WithOpenCharset marshalling.
      Specified by:
      toOpaque in interface Marshalling<A>
      Parameters:
      charset - (undocumented)
      Returns:
      (undocumented)