Class

zio.internal.macros

LayerBuilder

Related Doc: package macros

Permalink

final case class LayerBuilder[Type, Expr](target: List[Type], remainder: List[Type], providedLayers0: List[Expr], layerToDebug: PartialFunction[Expr, Debug], sideEffectType: Type, typeEquals: (Type, Type) ⇒ Boolean, foldTree: (LayerTree[Expr]) ⇒ Expr, method: ProvideMethod, exprToNode: (Expr) ⇒ Node[Type, Expr], typeToNode: (Type) ⇒ Node[Type, Expr], showExpr: (Expr) ⇒ String, showType: (Type) ⇒ String, reportWarn: (String) ⇒ Unit, reportError: (String) ⇒ Nothing) extends Product with Serializable

LayerBuilder houses the core logic for compile-time layer construction. It is parameterized by Type and Expr such that it can be shared across Scala 2 and 3, which have incompatible macro libraries.

target

A list of types indicating the intended output of the final layer. This is generally determined by the R of the effect that ZIO.provide is called on.

remainder

A list of types indicating the input of the final layer. This would be the parameter of ZIO.provideSome

providedLayers0

A list of layers ASTs that have been provided by the user.

layerToDebug

A method which allows LayerBuilder to filter/extract the special ZLayer.Debug layers from the provided layers.

typeEquals

A method for comparing types: Used in the construction of the final layer

foldTree

A method for folding a tree of layers into the final layer.

method

The sort of method that is being called: provide, provideSome, or provideCustom. This is used to provide improved compilation warnings.

exprToNode

A method for converting an Expr into a Node for use in the graph traversal.

typeToNode

A method for converting a leftover type into a Node to be used in the graph traversal.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. LayerBuilder
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new LayerBuilder(target: List[Type], remainder: List[Type], providedLayers0: List[Expr], layerToDebug: PartialFunction[Expr, Debug], sideEffectType: Type, typeEquals: (Type, Type) ⇒ Boolean, foldTree: (LayerTree[Expr]) ⇒ Expr, method: ProvideMethod, exprToNode: (Expr) ⇒ Node[Type, Expr], typeToNode: (Type) ⇒ Node[Type, Expr], showExpr: (Expr) ⇒ String, showType: (Type) ⇒ String, reportWarn: (String) ⇒ Unit, reportError: (String) ⇒ Nothing)

    Permalink

    target

    A list of types indicating the intended output of the final layer. This is generally determined by the R of the effect that ZIO.provide is called on.

    remainder

    A list of types indicating the input of the final layer. This would be the parameter of ZIO.provideSome

    providedLayers0

    A list of layers ASTs that have been provided by the user.

    layerToDebug

    A method which allows LayerBuilder to filter/extract the special ZLayer.Debug layers from the provided layers.

    typeEquals

    A method for comparing types: Used in the construction of the final layer

    foldTree

    A method for folding a tree of layers into the final layer.

    method

    The sort of method that is being called: provide, provideSome, or provideCustom. This is used to provide improved compilation warnings.

    exprToNode

    A method for converting an Expr into a Node for use in the graph traversal.

    typeToNode

    A method for converting a leftover type into a Node to be used in the graph traversal.

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def build: Expr

    Permalink
  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  8. val exprToNode: (Expr) ⇒ Node[Type, Expr]

    Permalink

    A method for converting an Expr into a Node for use in the graph traversal.

  9. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. val foldTree: (LayerTree[Expr]) ⇒ Expr

    Permalink

    A method for folding a tree of layers into the final layer.

  11. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  12. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  13. val layerToDebug: PartialFunction[Expr, Debug]

    Permalink

    A method which allows LayerBuilder to filter/extract the special ZLayer.Debug layers from the provided layers.

  14. val method: ProvideMethod

    Permalink

    The sort of method that is being called: provide, provideSome, or provideCustom.

    The sort of method that is being called: provide, provideSome, or provideCustom. This is used to provide improved compilation warnings.

  15. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  16. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  17. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  18. val providedLayers0: List[Expr]

    Permalink

    A list of layers ASTs that have been provided by the user.

  19. val remainder: List[Type]

    Permalink

    A list of types indicating the input of the final layer.

    A list of types indicating the input of the final layer. This would be the parameter of ZIO.provideSome

  20. val reportError: (String) ⇒ Nothing

    Permalink
  21. val reportWarn: (String) ⇒ Unit

    Permalink
  22. val showExpr: (Expr) ⇒ String

    Permalink
  23. val showType: (Type) ⇒ String

    Permalink
  24. val sideEffectType: Type

    Permalink
  25. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  26. val target: List[Type]

    Permalink

    A list of types indicating the intended output of the final layer.

    A list of types indicating the intended output of the final layer. This is generally determined by the R of the effect that ZIO.provide is called on.

  27. val typeEquals: (Type, Type) ⇒ Boolean

    Permalink

    A method for comparing types: Used in the construction of the final layer

  28. val typeToNode: (Type) ⇒ Node[Type, Expr]

    Permalink

    A method for converting a leftover type into a Node to be used in the graph traversal.

  29. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped