scala.deriving.Mirror
See theMirror companion trait
object Mirror
Attributes
- Companion
- trait
- Source
- Mirror.scala
- Graph
-
- Supertypes
- Self type
-
Mirror.type
Members list
Type members
Classlikes
The Mirror for a product type.
class SingletonProxy(val value: AnyRef) extends Product
A proxy for Scala 2 singletons, which do not inherit Singleton directly.
Extensions
Extensions
extension [T](p: ProductOf[T])
def fromProductTyped[A <: Product, Elems <: p.MirroredElemTypes](a: A)(using ProductOf[A] { type MirroredElemTypes = Elems; }): T
Creates a new instance of type T with elements taken from product a.
Creates a new instance of type T with elements taken from product a.
Type parameters
- A
-
the product type whose elements are used as input
- Elems
-
the tuple type representing
A's elements, constrained to be a subtype ofT'sMirroredElemTypes
Value parameters
- a
-
the product instance whose elements are copied into the new
T
Attributes
- Source
- Mirror.scala
Creates a new instance of type T with elements taken from tuple t.
Creates a new instance of type T with elements taken from tuple t.
Value parameters
- t
-
the tuple containing the elements for the new
Tinstance
Attributes
- Source
- Mirror.scala
In this article