Packages

object Codec extends CodecCompanionCompat

Source
Codec.scala
Linear Supertypes
CodecCompanionCompat, AnyRef, Any
Ordering
  1. Grouped
  2. Alphabetic
  3. By Inheritance
Inherited
  1. Codec
  2. CodecCompanionCompat
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. sealed abstract class Alt[A] extends AnyRef

  2. sealed abstract class AltBuilder[A] extends AnyRef

  3. type Aux[AvroType0, A] = Codec[A] { type AvroType = AvroType0 }
  4. sealed abstract class Field[A, B] extends AnyRef

  5. sealed abstract class FieldBuilder[A] extends AnyRef

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def apply[A](implicit codec: Codec[A]): codec.type

    Returns the Codec for the specified type.

  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. implicit final val boolean: Aux[Boolean, Boolean]

  7. implicit final lazy val byte: Aux[Int, Byte]

  8. implicit final val bytes: Aux[Bytes, Array[Byte]]

  9. implicit final def chain[A](implicit codec: Codec[A]): Aux[Array[AvroType], Chain[A]]

  10. implicit lazy val char: Aux[String, Char]

  11. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  12. implicit final def codecAuxShow[AvroType, A]: Show[Aux[AvroType, A]]

  13. implicit final val codecInvariant: Invariant[Codec]

  14. implicit final def codecShow[A]: Show[Codec[A]]

  15. final def decimal(precision: Int, scale: Int): Aux[Bytes, BigDecimal]

    Returns a new decimal Codec for type BigDecimal.

  16. final def decode[A](value: Any)(implicit codec: Codec[A]): Either[AvroError, A]

    Returns the result of decoding the specified value to the specified type.

  17. implicit lazy val double: Aux[Double, Double]

  18. implicit final def either[A, B](implicit codecA: Codec[A], codecB: Codec[B]): Aux[Any, Either[A, B]]

  19. final def encode[A](a: A)(implicit codec: Codec[A]): Either[AvroError, AvroType]

    Returns the result of encoding the specified value.

  20. final def enumeration[A](name: String, namespace: String, symbols: Seq[String], encode: (A) => String, decode: (String) => Either[AvroError, A], default: Option[A] = None, doc: Option[String] = None, aliases: Seq[String] = Seq.empty, props: Props = Props.empty): Aux[EnumSymbol, A]

    Returns a new enum Codec for type A.

  21. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  22. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  23. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  24. final def fixed[A](name: String, namespace: String, size: Int, encode: (A) => Array[Byte], decode: (Array[Byte]) => Either[AvroError, A], doc: Option[String] = None, aliases: Seq[String] = Seq.empty, props: Props = Props.empty): Aux[Fixed, A]

    Returns a new fixed Codec for type A.

    Returns a new fixed Codec for type A.

    When encoding, bytes are zero-padded to the specified size. Zero-padding is applied at the end, and will remain in the input to decode. Encoding checks to ensure the size is not exceeded, while decoding ensures the exact size.

  25. implicit lazy val float: Aux[Float, Float]

  26. final def fromBinary[A](bytes: Array[Byte], writerSchema: Schema)(implicit arg0: Codec[A]): Either[AvroError, A]

    Returns the result of decoding the specified Avro binary to the specified type.

  27. final def fromJson[A](json: String, writerSchema: Schema)(implicit arg0: Codec[A]): Either[AvroError, A]

    Returns the result of decoding the specified Avro JSON to the specified type.

  28. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  29. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  30. implicit lazy val instant: Aux[Long, Instant]

  31. implicit lazy val int: Aux[Int, Int]

  32. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  33. implicit final def left[A, B](implicit codec: Codec[A]): Aux[AvroType, Left[A, B]]

  34. implicit final def list[A](implicit codec: Codec[A]): Aux[Array[AvroType], List[A]]

  35. implicit lazy val localDate: Aux[Int, LocalDate]

  36. final val localTimeMicros: Aux[Long, LocalTime]

  37. final val localTimeMillis: Aux[Int, LocalTime]

  38. implicit lazy val long: Aux[Long, Long]

  39. implicit final def map[A](implicit codec: Codec[A]): Aux[Map[AvroType], Map[String, A]]

  40. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  41. implicit final def nonEmptyChain[A](implicit codec: Codec[A]): Aux[Array[AvroType], NonEmptyChain[A]]

  42. implicit final def nonEmptyList[A](implicit codec: Codec[A]): Aux[Array[AvroType], NonEmptyList[A]]

  43. implicit final def nonEmptyMap[A](implicit codec: Codec[A]): Aux[Map[AvroType], NonEmptyMap[String, A]]

  44. implicit final def nonEmptySet[A](implicit codec: Codec[A], ordering: Ordering[A]): Aux[Array[AvroType], NonEmptySet[A]]

  45. implicit final def nonEmptyVector[A](implicit codec: Codec[A]): Aux[Array[AvroType], NonEmptyVector[A]]

  46. implicit lazy val none: Aux[Null, None.type]

  47. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  48. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  49. implicit final def option[A](implicit codec: Codec[A]): Codec[Option[A]]

  50. final def record[A](name: String, namespace: String, doc: Option[String] = None, aliases: Seq[String] = Seq.empty, props: Props = Props.empty)(f: (FieldBuilder[A]) => FreeApplicative[[β$0$]Field[A, β$0$], A]): Aux[Record, A]

    Returns a new record Codec for type A.

  51. implicit final def right[A, B](implicit codec: Codec[B]): Aux[AvroType, Right[A, B]]

  52. implicit final def seq[A](implicit codec: Codec[A]): Aux[Array[AvroType], Seq[A]]

  53. implicit final def set[A](implicit codec: Codec[A]): Aux[Array[AvroType], Set[A]]

  54. implicit lazy val short: Aux[Int, Short]

  55. implicit final def some[A](implicit codec: Codec[A]): Aux[AvroType, Some[A]]

  56. implicit lazy val string: Aux[String, String]

  57. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  58. final def toBinary[A](a: A)(implicit arg0: Codec[A]): Either[AvroError, Array[Byte]]

    Returns the result of encoding the specified value to Avro binary.

  59. final def toJson[A](a: A)(implicit arg0: Codec[A]): Either[AvroError, String]

    Returns the result of encoding the specified value to Avro JSON.

  60. def toString(): String
    Definition Classes
    AnyRef → Any
  61. final def union[A](f: (AltBuilder[A]) => Chain[Alt[A]]): Aux[Any, A]

    Returns a new union Codec for type A.

  62. implicit lazy val unit: Aux[Null, Unit]

  63. implicit lazy val uuid: Aux[String, UUID]

  64. implicit final def vector[A](implicit codec: Codec[A]): Aux[Array[AvroType], Vector[A]]

  65. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  66. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  67. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  68. case object BooleanCodec extends InstanceForTypes[Boolean, Boolean] with Product with Serializable
  69. case object FloatCodec extends Codec[Float] with WithValidSchema[Float, Float] with Product with Serializable
  70. case object LongCodec extends Codec[Long] with WithValidSchema[Long, Long] with Product with Serializable

Deprecated Value Members

  1. final def deriveEnum[A](symbols: Seq[String], encode: (A) => String, decode: (String) => Either[AvroError, A])(implicit tag: scala.reflect.api.JavaUniverse.WeakTypeTag[A]): Aux[EnumSymbol, A]
    Definition Classes
    CodecCompanionCompat
    Annotations
    @deprecated
    Deprecated

    (Since version 1.3.0) Use vulcan.generic.deriveEnum in the vulcan-generic module, or define the codec explicitly using Codec.enumeration

  2. final def deriveFixed[A](size: Int, encode: (A) => Array[Byte], decode: (Array[Byte]) => Either[AvroError, A])(implicit tag: scala.reflect.api.JavaUniverse.WeakTypeTag[A]): Aux[Fixed, A]
    Definition Classes
    CodecCompanionCompat
    Annotations
    @deprecated
    Deprecated

    (Since version 1.3.0) Use vulcan.generic.deriveFixed in the vulcan-generic module, or define the codec explicitly using Codec.enumeration

  3. final def enum[A](name: String, namespace: String, symbols: Seq[String], encode: (A) => String, decode: (String) => Either[AvroError, A], default: Option[A] = None, doc: Option[String] = None, aliases: Seq[String] = Seq.empty, props: Props = Props.empty): Aux[EnumSymbol, A]
    Annotations
    @deprecated
    Deprecated

    (Since version 1.3.0) Use Codec.enumeration - enum is a keyword in Scala 3

  4. final def instance[AvroType0, A](schema: Either[AvroError, Schema], encode: (A) => Either[AvroError, AvroType0], decode: (Any, Schema) => Either[AvroError, A]): Aux[AvroType0, A]

    Returns a new Codec instance using the specified Schema, and encode and decode functions.

    Returns a new Codec instance using the specified Schema, and encode and decode functions.

    Annotations
    @deprecated
    Deprecated

    (Since version 1.9.0) Use existing primitives and combinators. If the functionality you need is not available or not exposed, please open an issue or pull request.

Inherited from CodecCompanionCompat

Inherited from AnyRef

Inherited from Any

General Codecs

Default codecs for standard library types.

Collection Codecs

Default codecs for standard library collection types.

Cats Codecs

Default codecs for Cats data types and type class instances for Codec.

Java Time Codecs

Default codecs for java.time types.

Java Util Codecs

Default codecs for java.util types.

Create Codecs

Functions for creating new codecs.

Utilities

Miscellaneous utility functions.

Ungrouped