- Companion:
- class
Type members
Classlikes
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.
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.
- Companion:
- object
Value members
Concrete methods
Gathers up the ZLayer inside of the given collection, and combines them into a single ZLayer containing an equivalent collection of results.
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.
Prints the specified message to the console for debugging purposes.
Constructs a layer that dies with the specified throwable.
Constructs a layer that dies with the specified throwable.
Constructs a layer that passes along the specified environment as an output.
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 error.
Constructs a layer that fails with the specified cause.
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].
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 effect, which must return one or more services.
Constructs a layer from the specified effect, which must return one or more services.
Constructs a layer that refails with the specified cause.
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.
Constructs a layer from the specified scoped effect, which must return one or more services.
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 that accesses and returns the specified service from the environment.
Constructs a layer from the specified value, which must return one or more services.
Constructs a layer from the specified value, which must return one or more services.
Inherited methods
Derives a simple layer for a case class given as a type parameter.
Derives a simple layer for a case class given as a type parameter.
case class Car(engine: Engine, wheels: Wheels)
val derivedLayer: ZLayer[Engine & Wheels, Nothing, Car] = ZLayer.deriveLayer[Car]
// equivalent to:
val manualLayer: ZLayer[Engine & Wheels, Nothing, Car] =
ZLayer.fromFunction(Car(_, _))
- Inherited from:
- ZLayerCompanionVersionSpecific
Automatically assembles a layer for the provided type.
Automatically assembles a layer for the provided type.
val layer = ZLayer.make[Car](carLayer, wheelsLayer, engineLayer)
- Inherited from:
- ZLayerCompanionVersionSpecific
Automatically assembles a layer for the provided type R,
leaving a remainder R0.
Automatically assembles 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)
- Inherited from:
- ZLayerCompanionVersionSpecific