A FunctionConstructor[Input]
knows how to construct a ZLayer
value from
a function of type Input
.
A FunctionConstructor[Input]
knows how to construct a ZLayer
value from
a function of type Input
. This allows the type of the ZLayer
value
constructed to depend on Input
.
Constructs a layer from an effectual resource.
Gathers up the ZLayer inside of the given collection, and combines them into a single ZLayer containing an equivalent collection of results.
Prints the specified message to the console for debugging purposes.
Constructs a layer that dies with the specified throwable.
A layer that does not produce any services.
Constructs a layer that passes along the specified environment as an output.
Constructs a layer that fails with the specified error.
Constructs a layer that fails with the specified cause.
Applies the function f
to each element of the Collection[A]
and returns
the results in a new Collection[B]
.
Constructs a layer from the specified function.
Constructs a layer from the specified effect.
Constructs a layer from the specified effect, which must return one or more services.
Automatically assembles a layer for the provided type.
Automatically assembles a layer for the provided type.
ZLayer.make[Car](carLayer, wheelsLayer, engineLayer)
Automatically constructs a layer for the provided type R
, leaving a
remainder R0
.
Automatically constructs a layer for the provided type R
, leaving a
remainder R0
.
val carLayer: ZLayer[Engine with Wheels, Nothing, Car] = ??? val wheelsLayer: ZLayer[Any, Nothing, Wheels] = ??? val layer = ZLayer.makeSome[Engine, Car](carLayer, wheelsLayer)
Constructs a layer that refails with the specified cause.
Constructs a layer from the specified scoped effect.
Constructs a layer from the specified scoped effect, which must return one or more services.
Constructs a layer that accesses and returns the specified service from the environment.
Constructs a layer from the specified value.
Constructs a layer from the specified value, which must return one or more services.
Lazily constructs a layer.
Lazily constructs a layer. This is useful to avoid infinite recursion when creating layers that refer to themselves.