AdtEncoder

trait AdtEncoder[T] extends Encoder[T]

An AdtEncoder is an Encoder which encodes its values with an envelope holding the value's type id.

It doesn't change or add to the outside interface of Encoder but merely serves as a marker signaling that it takes on the responsibility of encoding the type id in addition to the value itself. This allows outside encoders calling an AdtEncoder to delegate this responsibility rather than performing the task themselves.

trait Encoder[T]
class Object
trait Matchable
class Any

Value members

Inherited methods

def write(w: Writer, value: T): Writer
Inherited from:
Encoder