sealed abstract class Codec[A] extends AnyRef
Provides a schema, along with encoding and decoding functions for a given type.
- Annotations
- @implicitNotFound( ... )
- Alphabetic
- By Inheritance
- Codec
- AnyRef
- Any
- Hide All
- Show All
- 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): 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[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @HotSpotIntrinsicCandidate()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
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() @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( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
Deprecated Value Members
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] ) @Deprecated @deprecated
- Deprecated
(Since version ) see corresponding Javadoc for more information.