Packages

o

io.bullet.borer.derivation

MapBasedCodecs

object MapBasedCodecs

Derivation macros for map-based encodings.

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

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( ... ) @native()
  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 a map of values, one key-value pair for each member. The key for each member is a String holding the member's name. This can be customized with the key annotation.

  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 a map of values, one key-value pair for each member. The key for each member is a String holding the member's name. This can be customized with the key annotation.

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

Inherited from AnyRef

Inherited from Any

Ungrouped