Trait

kantan.codecs.shapeless

ShapelessInstances

Related Doc: package shapeless

Permalink

trait ShapelessInstances extends AnyRef

Provides Codec instances for case classes and sum types.

The purpose of this package is to let concrete Codec implementations (such as kantan.csv or kantan.regex) focus on providing instances for HList and Coproduct. Once such instances exist, this package will take care of the transformation from and to case classes and sum types.

Additionally, instances derived that way will be inserted with a sane precedence in the implicit resolution mechanism. This means, for example, that they will not override bespoke Option or Either instances.

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

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. implicit def caseClassDecoder[E, D, F, T, H <: HList](implicit gen: Aux[D, H], dr: Lazy[Decoder[E, H, F, T]]): DerivedDecoder[E, D, F, T]

    Permalink

    Provides a Decoder instance for case classes.

    Provides a Decoder instance for case classes.

    Given a case class D, this expects n Decoder instance for the HList type corresponding to D. It will then rely on that to turn encoded values into an HList, then turn the resulting value into a D.

  6. implicit def caseClassEncoder[E, D, T, H <: HList](implicit gen: Aux[D, H], er: Lazy[Encoder[E, H, T]]): DerivedEncoder[E, D, T]

    Permalink

    Provides an Encoder instance for case classes.

    Provides an Encoder instance for case classes.

    Given a case class D, this expects an Encoder instance for the HList type corresponding to D. It will then simply turn values of type D into values of the corresponding HList, then let the encoder take it from there.

  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def cnilDecoder[E, F, T](f: (E) ⇒ F): Decoder[E, CNil, F, T]

    Permalink
  9. implicit def cnilEncoder[E, D, T]: Encoder[E, CNil, T]

    Permalink
    Annotations
    @SuppressWarnings()
  10. implicit def coproductDecoder[E, H, D <: Coproduct, F, T](implicit dh: Decoder[E, H, F, T], dt: Decoder[E, D, F, T]): Decoder[E, :+:[H, D], F, T]

    Permalink
  11. implicit def coproductEncoder[E, H, D <: Coproduct, T](implicit eh: Encoder[E, H, T], ed: Encoder[E, D, T]): Encoder[E, :+:[H, D], T]

    Permalink
  12. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  13. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  14. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  15. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  16. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  17. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  18. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  19. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  20. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  21. implicit def sumTypeDecoder[E, D, F, T, C <: Coproduct](implicit gen: Aux[D, C], dr: Lazy[Decoder[E, C, F, T]]): DerivedDecoder[E, D, F, T]

    Permalink

    Provides a Decoder instance for sum types.

    Provides a Decoder instance for sum types.

    Given a case class D, this expects n Decoder instance for the Coproduct type corresponding to D. It will then rely on that to turn encoded values into a Coproduct, then turn the resulting value into a D.

  22. implicit def sumTypeEncoder[E, D, T, C <: Coproduct](implicit gen: Aux[D, C], er: Lazy[Encoder[E, C, T]]): DerivedEncoder[E, D, T]

    Permalink

    Provides an Encoder instance for sum types.

    Provides an Encoder instance for sum types.

    Given a sum type D, this expects an Encoder instance for the Coproduct type corresponding to D. It will then simply turn values of type D into values of the corresponding Coproduct, then let the encoder take it from there.

  23. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  24. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  25. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  27. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped