trait LowPriorityCodec extends AnyRef
Lower-priority codec implicits, which transform other codecs. For example, when deriving a codec
List[T] <-> Either[A, B]
, given codecs ca: T <-> A
and cb: T <-> B
, we want to get
listHead(eitherRight(ca, cb))
, not eitherRight(listHead(ca), listHead(cb))
(although they would
function the same).
- Self Type
- Codec.type
- Alphabetic
- By Inheritance
- LowPriorityCodec
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- def eitherLeft[L, A, B, CF <: CodecFormat](c1: Codec[L, A, CF], c2: Codec[L, B, CF]): Codec[L, Either[A, B], CF]
Create a codec which during decoding, first tries to decode values on the left using
c1
.Create a codec which during decoding, first tries to decode values on the left using
c1
. If this fails for any reason, decoding is done usingc2
. Both codecs must have the same low-level values and formats.For a right-biased variant see Codec.eitherRight.
The schema is defined to be an either schema as created by Schema.schemaForEither.
- implicit def eitherRight[L, A, B, CF <: CodecFormat](implicit c1: Codec[L, A, CF], c2: Codec[L, B, CF]): Codec[L, Either[A, B], CF]
Create a codec which during decoding, first tries to decode values on the right using
c2
.Create a codec which during decoding, first tries to decode values on the right using
c2
. If this fails for any reason, decoding is done usingc1
. Both codecs must have the same low-level values and formats.For a left-biased variant see Codec.eitherLeft. This right-biased version is the default when using implicit codec resolution.
The schema is defined to be an either schema as created by Schema.schemaForEither.
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated