Packages

object ZLayer extends ZLayerCompanionVersionSpecific

Linear Supertypes
ZLayerCompanionVersionSpecific, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ZLayer
  2. ZLayerCompanionVersionSpecific
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. sealed trait Debug extends AnyRef
  2. trait FunctionConstructor[In] extends AnyRef

    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.

  3. implicit final class ScopedEnvironmentPartiallyApplied[R] extends AnyVal
  4. implicit final class ScopedPartiallyApplied[R] extends AnyVal
  5. implicit final class ZLayerInvariantOps[RIn, E, ROut] extends AnyVal
  6. implicit final class ZLayerProvideSomeOps[RIn, E, ROut] extends AnyVal

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def apply[RIn, E, ROut](zio: => ZIO[RIn, E, ROut])(implicit arg0: Tag[ROut], trace: Trace): ZLayer[RIn, E, ROut]

    Constructs a layer from an effectual resource.

  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  7. def collectAll[R, E, A, Collection[+Element] <: Iterable[Element]](in: => Collection[ZLayer[R, E, A]])(implicit arg0: Tag[A], tag: Tag[Collection[A]], bf: zio.BuildFrom[Collection[ZLayer[R, E, A]], A, Collection[A]], trace: Trace): ZLayer[R, E, Collection[A]]

    Gathers up the ZLayer inside of the given collection, and combines them into a single ZLayer containing an equivalent collection of results.

  8. def debug(value: => Any)(implicit trace: Trace): ZLayer[Any, Nothing, Unit]

    Prints the specified message to the console for debugging purposes.

  9. macro 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]
    Definition Classes
    ZLayerCompanionVersionSpecific
  10. final def die(t: => Throwable)(implicit trace: Trace): ZLayer[Any, Nothing, Nothing]

    Constructs a layer that dies with the specified throwable.

  11. val empty: ZLayer[Any, Nothing, Any]

    A layer that does not produce any services.

  12. def environment[A](implicit trace: Trace): ZLayer[A, Nothing, A]

    Constructs a layer that passes along the specified environment as an output.

  13. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  15. def fail[E](e: => E)(implicit trace: Trace): Layer[E, Nothing]

    Constructs a layer that fails with the specified error.

  16. def failCause[E](cause: => Cause[E])(implicit trace: Trace): Layer[E, Nothing]

    Constructs a layer that fails with the specified cause.

  17. def foreach[R, E, A, B, Collection[+Element] <: Iterable[Element]](in: => Collection[A])(f: (A) => ZLayer[R, E, B])(implicit arg0: Tag[B], tag: Tag[Collection[B]], bf: zio.BuildFrom[Collection[A], B, Collection[B]], trace: Trace): ZLayer[R, E, Collection[B]]

    Applies the function f to each element of the Collection[A] and returns the results in a new Collection[B].

  18. def fromFunction[In](in: In)(implicit constructor: FunctionConstructor[In], trace: Trace): Out

    Constructs a layer from the specified function.

  19. def fromZIO[R, E, A](zio: => ZIO[R, E, A])(implicit arg0: Tag[A], trace: Trace): ZLayer[R, E, A]

    Constructs a layer from the specified effect.

  20. def fromZIOEnvironment[R, E, A](zio: => ZIO[R, E, ZEnvironment[A]])(implicit trace: Trace): ZLayer[R, E, A]

    Constructs a layer from the specified effect, which must return one or more services.

  21. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  22. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  23. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  24. def make[R]: MakePartiallyApplied[R]

    Automatically assembles a layer for the provided type.

    Automatically assembles a layer for the provided type.

    ZLayer.make[Car](carLayer, wheelsLayer, engineLayer)
    Definition Classes
    ZLayerCompanionVersionSpecific
  25. def makeSome[R0, R]: MakeSomePartiallyApplied[R0, R]

    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)
    Definition Classes
    ZLayerCompanionVersionSpecific
  26. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  27. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  28. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  29. def refailCause[E](cause: Cause[E])(implicit trace: Trace): Layer[E, Nothing]

    Constructs a layer that refails with the specified cause.

  30. def scoped[R]: ScopedPartiallyApplied[R]

    Constructs a layer from the specified scoped effect.

  31. def scopedEnvironment[R]: ScopedEnvironmentPartiallyApplied[R]

    Constructs a layer from the specified scoped effect, which must return one or more services.

  32. def service[A](implicit arg0: Tag[A], trace: Trace): ZLayer[A, Nothing, A]

    Constructs a layer that accesses and returns the specified service from the environment.

  33. def succeed[A](a: => A)(implicit arg0: Tag[A], trace: Trace): ULayer[A]

    Constructs a layer from the specified value.

  34. def succeedEnvironment[A](a: => ZEnvironment[A])(implicit trace: Trace): ULayer[A]

    Constructs a layer from the specified value, which must return one or more services.

  35. def suspend[RIn, E, ROut](layer: => ZLayer[RIn, E, ROut]): ZLayer[RIn, E, ROut]

    Lazily constructs a layer.

    Lazily constructs a layer. This is useful to avoid infinite recursion when creating layers that refer to themselves.

  36. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  37. def toString(): String
    Definition Classes
    AnyRef → Any
  38. val unit: ULayer[Unit]

    A layer that succeeds with a unit value.

  39. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  40. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  41. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  42. object Debug
  43. object Derive
  44. object FunctionConstructor

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from ZLayerCompanionVersionSpecific

Inherited from AnyRef

Inherited from Any

Ungrouped