harness.deriving.Labelling.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of harness-deriving_3 Show documentation
Show all versions of harness-deriving_3 Show documentation
Miscellaneous libraries/utilities for Scala.
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