builders

oxygen.meta.K0.ProductGeneric.builders
object builders

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
builders.type

Members list

Value members

Concrete methods

def eitherMapToInstance[E : Type](makeFieldValue: [i] => Field[i] => Expr[Either[E, i]]): Expr[Either[E, A]]

This is useful for when you want to produce an A as an output. As long as you can produce an instance of all the fields of A, then you can produce an A. This differs from mapToInstance in that it allows a fallible Either[E, A].

This is useful for when you want to produce an A as an output. As long as you can produce an instance of all the fields of A, then you can produce an A. This differs from mapToInstance in that it allows a fallible Either[E, A].

Hint: You are almost certainly going to want to call ProductGeneric.typeClassInstance from within makeFieldValue.

Attributes

def instanceFromLazyTypeClasses[TC[_] : Type](useTypeClassInstances: LazyTypeClasses[TC] => Expr[TC[A]]): Expr[TC[A]]

Same as instanceFromLazyTypeClasses, except typed for the most common case of: summon[ TC[] ] => TC[]

Same as instanceFromLazyTypeClasses, except typed for the most common case of: summon[ TC[] ] => TC[]

Attributes

def mapToInstance(makeFieldValue: [i] => Field[i] => Expr[i]): Expr[A]

This is useful for when you want to produce an A as an output. As long as you can produce an instance of all the fields of A, then you can produce an A. If you need a fallible Option[A] or Either[E, A], see optionMapToInstance or eitherMapToInstance.

This is useful for when you want to produce an A as an output. As long as you can produce an instance of all the fields of A, then you can produce an A. If you need a fallible Option[A] or Either[E, A], see optionMapToInstance or eitherMapToInstance.

Hint: You are almost certainly going to want to call ProductGeneric.typeClassInstance from within makeFieldValue.

Attributes

def mapToSeq[B](mapField: [i] => Field[i] => B): Seq[B]

This is useful when you want to get some Seq of "something else" out of your A.

This is useful when you want to get some Seq of "something else" out of your A.

Hint: You are almost certainly going to want to call ProductGeneric.typeClassInstance from within mapField.

Attributes

def optionMapToInstance(makeFieldValue: [i] => Field[i] => Expr[Option[i]]): Expr[Option[A]]

This is useful for when you want to produce an A as an output. As long as you can produce an instance of all the fields of A, then you can produce an A. This differs from mapToInstance in that it allows a fallible Option[A].

This is useful for when you want to produce an A as an output. As long as you can produce an instance of all the fields of A, then you can produce an A. This differs from mapToInstance in that it allows a fallible Option[A].

Hint: You are almost certainly going to want to call ProductGeneric.typeClassInstance from within makeFieldValue.

Attributes

def withLazyTypeClasses[TC[_] : Type, O : Type](useTypeClassInstances: LazyTypeClasses[TC] => Expr[O]): Expr[O]

This will summon instances for all fields. If no instance is found, you will receive a compile error.

This will summon instances for all fields. If no instance is found, you will receive a compile error.

Attributes