All Downloads are FREE. Search and download functionalities are using the official Maven repository.

medeia.generic.GenericEncoderInstances.scala Maven / Gradle / Ivy

The newest version!
package medeia.generic

import shapeless3.deriving.*

trait GenericEncoderInstances {
  @SuppressWarnings(Array("org.wartremover.warts.ImplicitConversion"))
  implicit inline def genericEncoder[A](using
      gen: K0.Generic[A],
      gdOptions: GenericDerivationOptions[A] = GenericDerivationOptions[A](),
      stOptions: SealedTraitDerivationOptions[A] = SealedTraitDerivationOptions[A]()
  ): GenericEncoder[A] =
    gen.derive(GenericProductEncoder.encoder, GenericCoproductEncoder.encoder)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy