ZLayerCompanionVersionSpecific

zio.ZLayerCompanionVersionSpecific

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object ZLayer.type

Members list

Value members

Concrete methods

transparent inline def derive[A]: ZLayer[Nothing, Any, A]

Automatically derives a simple layer for the provided type.

Automatically derives a simple layer for the provided type.

class Car(wheels: Wheels, engine: Engine) { /* ... */ }

val carLayer: URLayer[Wheels & Engine, Car] = ZLayer.derive[Car]

Attributes

inline def make[R]: WirePartiallyApplied[R]

Automatically assembles a layer for the provided type.

Automatically assembles a layer for the provided type.

val layer = ZLayer.make[Car](carLayer, wheelsLayer, engineLayer)

Attributes

def makeSome[R0, R]: WireSomePartiallyApplied[R0, R]

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)

Attributes