eitherEncoder

given eitherEncoder[A, B](using val a: Encoder[A], val b: Encoder[B]): Encoder[Either[A, B]]

Value members

Concrete methods

override def encode(schema: Schema): Either[A, B] => Any
Definition Classes

Inherited methods

final def contramap[U](f: U => Either[A, B]): Encoder[U]

Returns an [[Encoder[U]] by applying a function that maps a U to an T, before encoding as an T using this encoder.

Returns an [[Encoder[U]] by applying a function that maps a U to an T, before encoding as an T using this encoder.

Inherited from
Encoder

Concrete fields

protected val a: Encoder[A]
protected val b: Encoder[B]