trait
Codec[T, M <: MediaType, R] extends Decode[R, T]
Abstract Value Members
-
abstract
def
decode(s: R): DecodeResult[T]
-
abstract
def
encode(t: T): R
-
abstract
def
meta: CodecMeta[M, R]
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
-
final
def
##(): Int
-
final
def
==(arg0: Any): Boolean
-
final
def
asInstanceOf[T0]: T0
-
def
clone(): AnyRef
-
-
-
def
finalize(): Unit
-
final
def
getClass(): Class[_]
-
def
hashCode(): Int
-
final
def
isInstanceOf[T0]: Boolean
-
def
map[TT](f: (T) ⇒ TT)(g: (TT) ⇒ T): Codec[TT, M, R]
-
def
mapDecode[TT](f: (T) ⇒ DecodeResult[TT])(g: (TT) ⇒ T): Codec[TT, M, R]
-
def
mediaType[M2 <: MediaType](m2: M2): Codec[T, M2, R]
-
-
final
def
notify(): Unit
-
final
def
notifyAll(): Unit
-
def
safeDecode(f: R): DecodeResult[T]
-
def
schema(s2: Schema): Codec[T, M, R]
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
-
def
toString(): String
-
final
def
wait(): Unit
-
final
def
wait(arg0: Long, arg1: Int): Unit
-
final
def
wait(arg0: Long): Unit
A pair of functions, one to encode a value of type
T
to a raw value of typeR
, and another one to decode.Also contains meta-data on the
schema
of the value, the media type and the raw value type.Type of the values which can be encoded / to which raw values can be decoded.
The media type of encoded values.
Type of the raw value to which values are encoded.