kantan.codecs.export

Provides a simple mechanism to insert derived type class instances in the implicit resolution mechanism.

By default, when imported, such instances have the highest possible priority, which is typically problematic with shapeless instance derivation: bespoke instances for Option or Either, for example, find themselves shadowed by the generically derived ones.

If such instances are of type kantan.codecs.export.DerivedDecoder / kantan.codecs.export.DerivedEncoder rather than Decoder / Encoder, however, they'll find themselves with a lower precedence and only be used if no other, more specific instance is found.

Attributes

Members list

Type members

Classlikes

Provides construction methods for kantan.codecs.export.DerivedDecoder.

Provides construction methods for kantan.codecs.export.DerivedDecoder.

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type

Provides construction methods for kantan.codecs.export.DerivedEncoder.

Provides construction methods for kantan.codecs.export.DerivedEncoder.

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
final case class Exported[A](value: A) extends AnyVal

Wraps derived type class instances.

Wraps derived type class instances.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class AnyVal
trait Matchable
class Any
Show all

Types

type DerivedDecoder[E, D, F, T] = Exported[Decoder[E, D, F, T]]

Decoder instance that should only be used when no specific one is found.

Decoder instance that should only be used when no specific one is found.

Attributes

type DerivedEncoder[E, D, T] = Exported[Encoder[E, D, T]]

Encoder instance that should only be used when no specific one is found.

Encoder instance that should only be used when no specific one is found.

Attributes