Packages

o

io.bullet.borer.derivation

ArrayBasedCodecs

object ArrayBasedCodecs

Derivation macros for array-based encodings.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ArrayBasedCodecs
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

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 asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  6. macro def deriveAllCodecs[T]: Codec[T]

    Macro that creates an Encoder and Decoder pair for T and all direct and indirect sub-types of T.

    Macro that creates an Encoder and Decoder pair for T and all direct and indirect sub-types of T. Convenience shortcut for Codec(deriveAllEncoders[T], deriveAllDecoders[T])".

  7. macro def deriveAllDecoders[T]: Decoder[T]

    Macro that creates a Decoder for T and all direct and indirect sub-types of T, which are concrete, i.e.

    Macro that creates a Decoder for T and all direct and indirect sub-types of T, which are concrete, i.e. not abstract. T must be a sealed abstract class or sealed trait.

    It works by generating a code block such as this one:

    implicit val a = deriveDecoder[A]     // one such line is generated for each concrete
    implicit val b = deriveDecoder[B]     // direct or indirect sub-type of T which doesn't
    implicit val c = deriveDecoder[C]     // already have an implicit Decoder available
    ...
    deriveDecoder[T]

    If a Decoder for a certain concrete sub-type S <: T is already implicitly available at the macro call-site the respective line for the sub-type is **not** generated.

    If a Decoder for a certain abstract sub-type S <: T is already implicitly available at the macro call-site the respective lines for **all** sub-types of S are **not** generated.

    This means that you can specify your own custom Decoders for concrete sub-types or whole branches of the sub-type hierarchy and they will be properly picked up rather than create conflicts.

  8. macro def deriveAllEncoders[T]: Encoder[T]

    Macro that creates an Encoder for T and all direct and indirect sub-types of T, which are concrete, i.e.

    Macro that creates an Encoder for T and all direct and indirect sub-types of T, which are concrete, i.e. not abstract. T must be a sealed abstract class or sealed trait.

    It works by generating a code block such as this one:

    implicit val a = deriveEncoder[A]     // one such line is generated for each concrete
    implicit val b = deriveEncoder[B]     // direct or indirect sub-type of T which doesn't
    implicit val c = deriveEncoder[C]     // already have an implicit Encoder available
    ...
    deriveEncoder[T]

    If an Encoder for a certain concrete sub-type S <: T is already implicitly available at the macro call-site the respective line for the sub-type is **not** generated.

    If an Encoder for a certain abstract sub-type S <: T is already implicitly available at the macro call-site the respective lines for **all** sub-types of S are **not** generated.

    This means that you can specify your own custom Encoders for concrete sub-types or whole branches of the sub-type hierarchy and they will be properly picked up rather than create conflicts.

  9. macro def deriveCodec[T]: Codec[T]

    Macro that creates an Encoder and Decoder pair for T.

    Macro that creates an Encoder and Decoder pair for T. Convenience shortcut for Codec(deriveEncoder[T], deriveDecoder[T])".

  10. macro def deriveDecoder[T]: Decoder[T]

    Macro that creates a Decoder for T provided that - T is a case class, sealed abstract class or sealed trait - Decoder instances for all members of T (if T is a case class) or all sub-types of T (if T is an ADT) are implicitly available

    Macro that creates a Decoder for T provided that - T is a case class, sealed abstract class or sealed trait - Decoder instances for all members of T (if T is a case class) or all sub-types of T (if T is an ADT) are implicitly available

    Case classes are created from an array of deserialized values, one value for each member.

    NOTE: If T is unary (i.e. only has a single member) then the member value is expected in an unwrapped form, i.e. without the array container.

  11. macro def deriveEncoder[T]: Encoder[T]

    Macro that creates an Encoder for T provided that - T is a case class, sealed abstract class or sealed trait - Encoder instances for all members of T (if T is a case class) or all sub-types of T (if T is an ADT) are implicitly available

    Macro that creates an Encoder for T provided that - T is a case class, sealed abstract class or sealed trait - Encoder instances for all members of T (if T is a case class) or all sub-types of T (if T is an ADT) are implicitly available

    Case classes are converted into an array of values, one value for each member.

    NOTE: If T is unary (i.e. only has a single member) then the member value is written in an unwrapped form, i.e. without the array container.

  12. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  14. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  15. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  16. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  17. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  19. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  20. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  21. def toString(): String
    Definition Classes
    AnyRef → Any
  22. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  23. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  24. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from AnyRef

Inherited from Any

Ungrouped