Mirror

scala.deriving.Mirror
See theMirror companion trait
object Mirror

Attributes

Companion
trait
Source
Mirror.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Mirror.type

Members list

Type members

Classlikes

trait Product extends Mirror

The Mirror for a product type

The Mirror for a product type

Attributes

Source
Mirror.scala
Supertypes
trait Mirror
class Object
trait Matchable
class Any
Known subtypes
trait Singleton extends Product

Attributes

Source
Mirror.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
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

Attributes

Source
Mirror.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
trait Sum extends Mirror

The Mirror for a sum type

The Mirror for a sum type

Attributes

Source
Mirror.scala
Supertypes
trait Mirror
class Object
trait Matchable
class Any
Self type
Sum

Types

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

Attributes

Source
Mirror.scala
type ProductOf[T] = Product { type MirroredType = T; type MirroredMonoType = T; type MirroredElemTypes <: Tuple; }

Attributes

Source
Mirror.scala
type SumOf[T] = Sum { type MirroredType = T; type MirroredMonoType = T; type MirroredElemTypes <: Tuple; }

Attributes

Source
Mirror.scala

Extensions

Extensions

extension [T](p: ProductOf[T])
def fromProductTyped[A <: Product, Elems <: p.MirroredElemTypes](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.

Attributes

Source
Mirror.scala
def fromTuple(t: p.MirroredElemTypes): 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.

Attributes

Source
Mirror.scala