Mirror

object Mirror
Companion:
class
Source:
Mirror.scala
class Object
trait Matchable
class Any
Mirror.type

Type members

Classlikes

trait Product extends Mirror

The Mirror for a product type

The Mirror for a product type

Source:
Mirror.scala
trait Singleton extends Product
class SingletonProxy(val value: AnyRef) extends Product

A proxy for Scala 2 singletons, which do not inherit Singleton directly

A proxy for Scala 2 singletons, which do not inherit Singleton directly

Source:
Mirror.scala
trait Sum extends Mirror

The Mirror for a sum type

The Mirror for a sum type

Source:
Mirror.scala

Types

type Of[T] = Mirror { type MirroredType = T; type MirroredMonoType = T; type MirroredElemTypes <: Tuple; }
type ProductOf[T] = Product { type MirroredType = T; type MirroredMonoType = T; type MirroredElemTypes <: Tuple; }
type SumOf[T] = Sum { type MirroredType = T; type MirroredMonoType = T; type MirroredElemTypes <: Tuple; }

Extensions

Extensions

extension [T](p: ProductOf[T])
def fromProductTyped[A <: Product, Elems <: <none>](a: A)(using m: ProductOf[A] { type MirroredElemTypes = Elems; }): T

Create a new instance of type T with elements taken from product a.

Create a new instance of type T with elements taken from product a.

Source:
Mirror.scala
def fromTuple(t: <none>): T

Create a new instance of type T with elements taken from tuple t.

Create a new instance of type T with elements taken from tuple t.

Source:
Mirror.scala