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
.
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.
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
.
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.
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 forHList
andCoproduct
. 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
orEither
instances.