object Marshaller extends GenericMarshallers with PredefinedToEntityMarshallers with PredefinedToResponseMarshallers with PredefinedToRequestMarshallers
- Source
- Marshaller.scala
- Alphabetic
- By Inheritance
- Marshaller
- PredefinedToRequestMarshallers
- PredefinedToResponseMarshallers
- PredefinedToEntityMarshallers
- MultipartMarshallers
- GenericMarshallers
- LowPriorityToResponseMarshallerImplicits
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
implicit
val
ByteArrayMarshaller: ToEntityMarshaller[Array[Byte]]
- Definition Classes
- PredefinedToEntityMarshallers
-
implicit
val
ByteStringMarshaller: ToEntityMarshaller[ByteString]
- Definition Classes
- PredefinedToEntityMarshallers
-
implicit
val
CharArrayMarshaller: ToEntityMarshaller[Array[Char]]
- Definition Classes
- PredefinedToEntityMarshallers
-
implicit
val
DoneMarshaller: ToEntityMarshaller[Done]
- Definition Classes
- PredefinedToEntityMarshallers
-
implicit
val
FormDataMarshaller: ToEntityMarshaller[FormData]
- Definition Classes
- PredefinedToEntityMarshallers
-
implicit
val
MessageEntityMarshaller: ToEntityMarshaller[MessageEntity]
- Definition Classes
- PredefinedToEntityMarshallers
-
implicit
val
StringMarshaller: ToEntityMarshaller[String]
- Definition Classes
- PredefinedToEntityMarshallers
-
def
apply[A, B](f: (ExecutionContext) ⇒ (A) ⇒ Future[List[Marshalling[B]]]): Marshaller[A, B]
Creates a Marshaller from the given function.
-
def
byteArrayMarshaller(contentType: ContentType): ToEntityMarshaller[Array[Byte]]
- Definition Classes
- PredefinedToEntityMarshallers
-
def
byteStringMarshaller(contentType: ContentType): ToEntityMarshaller[ByteString]
- Definition Classes
- PredefinedToEntityMarshallers
-
def
charArrayMarshaller(mediaType: WithFixedCharset): ToEntityMarshaller[Array[Char]]
- Definition Classes
- PredefinedToEntityMarshallers
-
def
charArrayMarshaller(mediaType: WithOpenCharset): ToEntityMarshaller[Array[Char]]
- Definition Classes
- PredefinedToEntityMarshallers
-
def
combined[A, B, C](marshal: (A) ⇒ B)(implicit m2: Marshaller[B, C]): Marshaller[A, C]
Helper for creating a Marshaller combined of the provided
marshal
function and an implicit Marshaller which is able to produce the required final type. -
implicit
def
eitherMarshaller[A1, A2, B](implicit m1: Marshaller[A1, B], m2: Marshaller[A2, B]): Marshaller[Either[A1, A2], B]
- Definition Classes
- GenericMarshallers
-
implicit
def
fromEntityStreamingSupportAndByteStringMarshaller[T, M](implicit arg0: ClassTag[T], s: EntityStreamingSupport, m: ToByteStringMarshaller[T]): ToResponseMarshaller[Source[T, M]]
- Definition Classes
- PredefinedToResponseMarshallers
-
implicit
def
fromEntityStreamingSupportAndEntityMarshaller[T, M](implicit s: EntityStreamingSupport, m: ToEntityMarshaller[T], tag: ClassTag[T]): ToResponseMarshaller[Source[T, M]]
- Definition Classes
- LowPriorityToResponseMarshallerImplicits
-
implicit
def
fromMethodAndUriAndHeadersAndValue[T](implicit mt: ToEntityMarshaller[T]): TRM[(HttpMethod, Uri, Seq[HttpHeader], T)]
- Definition Classes
- PredefinedToRequestMarshallers
-
implicit
def
fromMethodAndUriAndValue[S, T](implicit mt: ToEntityMarshaller[T]): TRM[(HttpMethod, Uri, T)]
- Definition Classes
- PredefinedToRequestMarshallers
-
implicit
val
fromRequest: TRM[HttpRequest]
- Definition Classes
- PredefinedToRequestMarshallers
-
implicit
val
fromResponse: TRM[HttpResponse]
- Definition Classes
- PredefinedToResponseMarshallers
-
implicit
val
fromStatusCode: TRM[StatusCode]
Creates a response for a status code.
Creates a response for a status code. Does not support content-type negotiation but will return a response either with a
text-plain
entity containing thestatus.defaultMessage
or an empty entity for status codes that don't allow a response.- Definition Classes
- PredefinedToResponseMarshallers
-
implicit
val
fromStatusCodeAndHeaders: TRM[(StatusCode, Seq[HttpHeader])]
Creates a response from status code and headers.
Creates a response from status code and headers. Does not support content-type negotiation but will return a response either with a
text-plain
entity containing thestatus.defaultMessage
or an empty entity for status codes that don't allow a response.- Definition Classes
- PredefinedToResponseMarshallers
-
implicit
def
fromStatusCodeAndHeadersAndValue[T](implicit mt: ToEntityMarshaller[T]): TRM[(StatusCode, Seq[HttpHeader], T)]
- Definition Classes
- PredefinedToResponseMarshallers
-
implicit
def
fromStatusCodeAndValue[S, T](implicit sConv: (S) ⇒ StatusCode, mt: ToEntityMarshaller[T]): TRM[(S, T)]
- Definition Classes
- PredefinedToResponseMarshallers
-
implicit
def
fromStatusCodeConvertibleAndHeadersAndT[S, T](implicit sConv: (S) ⇒ StatusCode, mt: ToEntityMarshaller[T]): TRM[(S, Seq[HttpHeader], T)]
- Definition Classes
- PredefinedToResponseMarshallers
-
def
fromToEntityMarshaller[T](status: StatusCode = StatusCodes.OK, headers: Seq[HttpHeader] = Nil)(implicit m: ToEntityMarshaller[T]): ToResponseMarshaller[T]
- Definition Classes
- PredefinedToResponseMarshallers
-
implicit
def
fromUri: TRM[Uri]
- Definition Classes
- PredefinedToRequestMarshallers
-
implicit
def
futureMarshaller[A, B](implicit m: Marshaller[A, B]): Marshaller[Future[A], B]
- Definition Classes
- GenericMarshallers
-
implicit
def
liftMarshaller[T](implicit m: ToEntityMarshaller[T]): ToResponseMarshaller[T]
- Definition Classes
- LowPriorityToResponseMarshallerImplicits
-
implicit
def
liftMarshallerConversion[T](m: ToEntityMarshaller[T]): ToResponseMarshaller[T]
- Definition Classes
- LowPriorityToResponseMarshallerImplicits
-
implicit
def
multipartMarshaller[T <: Multipart](implicit log: LoggingAdapter = DefaultNoLogging): ToEntityMarshaller[T]
- Definition Classes
- MultipartMarshallers
-
def
oneOf[T, A, B](values: T*)(f: (T) ⇒ Marshaller[A, B]): Marshaller[A, B]
Helper for creating a "super-marshaller" from a number of values and a function producing "sub-marshallers" from these values.
Helper for creating a "super-marshaller" from a number of values and a function producing "sub-marshallers" from these values. 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 Akka HTTP.
-
def
oneOf[A, B](marshallers: 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 Akka HTTP.
-
def
opaque[A, B](marshal: (A) ⇒ B): Marshaller[A, B]
Helper for creating a synchronous Marshaller to non-negotiable content from the given function.
-
implicit
def
optionMarshaller[A, B](implicit m: Marshaller[A, B], empty: EmptyValue[B]): Marshaller[Option[A], B]
- Definition Classes
- GenericMarshallers
-
def
strict[A, B](f: (A) ⇒ Marshalling[B]): Marshaller[A, B]
Helper for creating a Marshaller using the given function.
-
def
stringMarshaller(mediaType: WithFixedCharset): ToEntityMarshaller[String]
- Definition Classes
- PredefinedToEntityMarshallers
-
def
stringMarshaller(mediaType: WithOpenCharset): ToEntityMarshaller[String]
- Definition Classes
- PredefinedToEntityMarshallers
-
implicit
def
throwableMarshaller[T]: Marshaller[Throwable, T]
- Definition Classes
- GenericMarshallers
-
implicit
def
tryMarshaller[A, B](implicit m: Marshaller[A, B]): Marshaller[Try[A], B]
- Definition Classes
- GenericMarshallers
-
def
withFixedContentType[A, B](contentType: ContentType)(marshal: (A) ⇒ B): Marshaller[A, B]
Helper for creating a synchronous Marshaller to content with a fixed charset from the given function.
-
def
withOpenCharset[A, B](mediaType: WithOpenCharset)(marshal: (A, HttpCharset) ⇒ B): Marshaller[A, B]
Helper for creating a synchronous Marshaller to content with a negotiable charset from the given function.