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

harness.deriving.Labelling.scala Maven / Gradle / Ivy

The newest version!
package harness.deriving

import harness.deriving.Utils.*
import scala.compiletime.*
import scala.deriving.Mirror

final case class Labelling[A](label: String, elemLabels: List[String])
object Labelling {

  inline def apply[A](labelling: Labelling[A]): Labelling[A] = labelling

  inline given of[A](using mirror: Mirror.Of[A]): Labelling[A] =
    Labelling[A](
      constValue[mirror.MirroredLabel & String],
      summonList[mirror.MirroredElemLabels, String],
    )

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy