final case class LayerBuilder[Type, Expr](target0: List[Type], remainder: RemainderMethod[Type], providedLayers0: List[Expr], layerToDebug: PartialFunction[Expr, Debug], sideEffectType: Type, anyType: 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.
- 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, orprovideCustom. 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.
- Alphabetic
- By Inheritance
- LayerBuilder
- Serializable
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
LayerBuilder(target0: List[Type], remainder: RemainderMethod[Type], providedLayers0: List[Expr], layerToDebug: PartialFunction[Expr, Debug], sideEffectType: Type, anyType: 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)
- 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, orprovideCustom. 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.
Type Members
- final case class MermaidGraph(topLevel: Chunk[String], deps: Map[String, Chunk[String]]) extends Product with Serializable
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- val anyType: Type
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
build: Expr
Returns tree representing final
ZLayer[In, Err, Out]Returns tree representing final
ZLayer[In, Err, Out]If remainder is RemainderMethod.Inferred
Inwill be some generated typeErrwill be the union of all errors in the provided layersOutwill be AND'ed together types from target0
If remainder is RemainderMethod.Provided and provide method is not ProvideMethod.ProvideSomeShared
Inwill be AND'ed together types from remainderErrwill be the union of all errors in the provided layersOutwill be AND'ed together types from target0
If remainder is RemainderMethod.Provided and provide method is ProvideMethod.ProvideSomeShared
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @HotSpotIntrinsicCandidate()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- val exprToNode: (Expr) ⇒ Node[Type, Expr]
- val foldTree: (LayerTree[Expr]) ⇒ Expr
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val layerToDebug: PartialFunction[Expr, Debug]
- val method: ProvideMethod
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- val providedLayers0: List[Expr]
- val remainder: RemainderMethod[Type]
- val reportError: (String) ⇒ Nothing
- val reportWarn: (String) ⇒ Unit
- val showExpr: (Expr) ⇒ String
- val showType: (Type) ⇒ String
- val sideEffectType: Type
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
- lazy val target: List[Type]
- val target0: List[Type]
- val typeEquals: (Type, Type) ⇒ Boolean
- val typeToNode: (Type) ⇒ Node[Type, Expr]
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
- object MermaidGraph extends Serializable