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.
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 using 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)
A layer that constructs a scope and closes it when the workflow the layer is provided to completes execution, whether by success, failure, or interruption.
A layer that constructs a scope and closes it when the workflow the layer is provided to completes execution, whether by success, failure, or interruption. This can be used to close a scope when providing a layer to a workflow.
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.