
com.avsystem.commons.misc.SamCompanion.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of commons-core_2.12 Show documentation
Show all versions of commons-core_2.12 Show documentation
AVSystem commons library for Scala
The newest version!
package com.avsystem.commons
package misc
import com.avsystem.commons.misc.SamCompanion.ValidSam
abstract class SamCompanion[T, F](implicit vs: ValidSam[T, F]) {
def apply(fun: F): T = macro com.avsystem.commons.macros.misc.SamMacros.toSam[T, F]
}
object SamCompanion {
sealed trait ValidSam[T, F]
object ValidSam {
implicit def isValidSam[T, F]: ValidSam[T, F] = macro com.avsystem.commons.macros.misc.SamMacros.validateSam[T, F]
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy