difflicious.generic.auto

Members list

Type members

Inherited classlikes

final class SealedTraitDiffer[T](ctx: SealedTrait[Differ, T], isIgnored: Boolean) extends Differ[T]

Attributes

Inherited from:
DifferGen
Supertypes
trait Differ[T]
trait ConfigureMethods[T]
class Object
trait Matchable
class Any

Inherited types

type Typeclass[T] = Differ[T]

Attributes

Inherited from:
CommonDerivation

Value members

Inherited methods

inline def `getParams__`[T, Labels <: Tuple, Params <: Tuple](annotations: Map[String, List[Any]], inheritedAnnotations: Map[String, List[Any]], typeAnnotations: Map[String, List[Any]], repeated: Map[String, Boolean], defaults: Map[String, Option[() => Any]], idx: Int): List[Param[Typeclass, T]]

Attributes

Inherited from:
CommonDerivation
inline override protected def deriveSubtype[s](m: Of[s]): Differ[s]

Attributes

Definition Classes
Derivation -> SealedTraitDerivation
Inherited from:
Derivation
inline def derived[A](using Of[A]): Differ[A]

Attributes

Inherited from:
Derivation
inline def derivedMirror[A](using mirror: Of[A]): Differ[A]

Attributes

Inherited from:
Derivation
inline def derivedMirrorProduct[A](product: ProductOf[A]): Differ[A]

Attributes

Inherited from:
CommonDerivation
inline def derivedMirrorSum[A](sum: SumOf[A]): Differ[A]

Attributes

Inherited from:
Derivation
def fallback[T]: Differ[T]

Attributes

Inherited from:
DerivedAutoDerivation
inline def getParams[T, Labels <: Tuple, Params <: Tuple](annotations: Map[String, List[Any]], typeAnnotations: Map[String, List[Any]], repeated: Map[String, Boolean], idx: Int): List[Param[Typeclass, T]]

Attributes

Inherited from:
CommonDerivation
inline def getParams_[T, Labels <: Tuple, Params <: Tuple](annotations: Map[String, List[Any]], inheritedAnnotations: Map[String, List[Any]], typeAnnotations: Map[String, List[Any]], repeated: Map[String, Boolean], idx: Int): List[Param[Typeclass, T]]

Attributes

Inherited from:
CommonDerivation
override def join[T](ctx: CaseClass[Differ, T]): Differ[T]

Must be implemented by the user of Magnolia to construct a typeclass for case class T using the provided type info. E.g. if we are deriving Show[T] typeclasses, and T is a case class Foo(...), we need to constuct Show[Foo].

Must be implemented by the user of Magnolia to construct a typeclass for case class T using the provided type info. E.g. if we are deriving Show[T] typeclasses, and T is a case class Foo(...), we need to constuct Show[Foo].

This method is called 'join' because typically it will join together the typeclasses for all the parameters of the case class, into a single typeclass for the case class itself. The field CaseClass.params can provide useful information for doing this.

Value parameters

caseClass

information about the case class T, its parameters, and their typeclasses

Attributes

Definition Classes
DifferGen -> CommonDerivation
Inherited from:
DifferGen
inline protected def sealedTraitFromMirror[A](m: SumOf[A]): SealedTrait[Typeclass, A]

Attributes

Inherited from:
SealedTraitDerivation
override def split[T](ctx: SealedTrait[Differ, T]): Differ[T]

This must be implemented by the user of Magnolia to construct a Typeclass for 'T', where 'T' is a Sealed Trait or Scala 3 Enum, using the provided type info. E.g. if we are deriving 'Show[T]' typeclasses, and T is an enum 'Suit' (eg with values Diamonds, Clubs, etc), we need to constuct 'Show[Suit]'.

This must be implemented by the user of Magnolia to construct a Typeclass for 'T', where 'T' is a Sealed Trait or Scala 3 Enum, using the provided type info. E.g. if we are deriving 'Show[T]' typeclasses, and T is an enum 'Suit' (eg with values Diamonds, Clubs, etc), we need to constuct 'Show[Suit]'.

This method is called 'split' because it will ''split'' the different possible types of the SealedTrait, and handle each one to finally produce a typeclass capable of handling any possible subtype of the trait.

A useful function for implementing this method is SealedTrait#choose, which can take a value instance and provide information on the specific subtype of the sealedTrait which that value is.

Attributes

Definition Classes
DifferGen -> Derivation
Inherited from:
DifferGen
transparent inline def subtypes[T, SubtypeTuple <: Tuple](m: SumOf[T], idx: Int): List[Subtype[Typeclass, T, _]]

Attributes

Inherited from:
Derivation
transparent inline protected def subtypesFromMirror[A, SubtypeTuple <: Tuple](m: SumOf[A], idx: Int): List[Subtype[Typeclass, A, _]]

Attributes

Inherited from:
SealedTraitDerivation

Givens

Inherited givens

inline given autoDerived[A](using Of[A]): Differ[A]

Attributes

Inherited from:
AutoDerivation
given derivedDiff[T]: Conversion[Differ[T], Derived[T]]

Attributes

Inherited from:
DerivedAutoDerivation

Implicits

Inherited implicits

implicit inline def diffForCaseClass[T](implicit m: Of[T]): Derived[T]

Attributes

Inherited from:
DerivedAutoDerivation