sealed abstract class Codec[A] extends AnyRef
Provides a schema, along with encoding and decoding functions for a given type.
- Annotations
- @implicitNotFound("could not find implicit Codec[${A}]; ensure no imports are missing or manually define an instance")
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- Codec
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- All
Abstract Value Members
- abstract def decode(value: Any, schema: Schema): Either[AvroError, A]
Attempts to decode the specified value using the provided schema.
- abstract def encode(a: A, schema: Schema): Either[AvroError, Any]
Attempts to encode the specified value using the provided schema.
- abstract def schema: Either[AvroError, Schema]
The schema or an error if the schema could not be generated.
Concrete 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[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def imap[B](f: (A) => B)(g: (B) => A): Codec[B]
Returns a new Codec which uses this Codec for encoding and decoding, mapping back-and-forth between types
A
andB
. - final def imapError[B](f: (A) => Either[AvroError, B])(g: (B) => A): Codec[B]
Returns a new Codec which uses this Codec for encoding and decoding, mapping back-and-forth between types
A
andB
.Returns a new Codec which uses this Codec for encoding and decoding, mapping back-and-forth between types
A
andB
.Similar to Codec#imap, except the mapping from
A
toB
might be unsuccessful. - 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()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- 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()