object ZLayer extends ZLayerCompanionVersionSpecific
- Alphabetic
- By Inheritance
- ZLayer
- ZLayerCompanionVersionSpecific
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- sealed trait Debug extends AnyRef
- implicit final class ScopedEnvironmentPartiallyApplied[R] extends AnyVal
- implicit final class ScopedPartiallyApplied[R] extends AnyVal
- implicit final class ZLayerInvariantOps[RIn, E, ROut] extends AnyVal
- implicit final class ZLayerProvideSomeOps[RIn, E, ROut] extends AnyVal
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def apply[RIn, E, ROut](zio: ZIO[RIn, E, ROut])(implicit arg0: Tag[ROut], trace: ZTraceElement): ZLayer[RIn, E, ROut]
Constructs a layer from an effectual resource.
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- 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: ZTraceElement): 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.
- final def die(t: Throwable)(implicit trace: ZTraceElement): ZLayer[Any, Nothing, Nothing]
Constructs a layer that dies with the specified throwable.
- val empty: ZLayer[Any, Nothing, Any]
A layer that does not produce any services.
- def environment[A](implicit trace: ZTraceElement): ZLayer[A, Nothing, A]
Constructs a layer that passes along the specified environment as an output.
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def fail[E](e: E)(implicit trace: ZTraceElement): Layer[E, Nothing]
Constructs a layer that fails with the specified error.
- def failCause[E](cause: Cause[E])(implicit trace: ZTraceElement): Layer[E, Nothing]
Constructs a layer that fails with the specified cause.
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- 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: ZTraceElement): ZLayer[R, E, Collection[B]]
Applies the function
f
to each element of theCollection[A]
and returns the results in a newCollection[B]
. - def fromFunction[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W](f: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V) => W)(implicit arg0: Tag[A], arg1: Tag[B], arg2: Tag[C], arg3: Tag[D], arg4: Tag[E], arg5: Tag[F], arg6: Tag[G], arg7: Tag[H], arg8: Tag[I], arg9: Tag[J], arg10: Tag[K], arg11: Tag[L], arg12: Tag[M], arg13: Tag[N], arg14: Tag[O], arg15: Tag[P], arg16: Tag[Q], arg17: Tag[R], arg18: Tag[S], arg19: Tag[T], arg20: Tag[U], arg21: Tag[V], arg22: Tag[W], trace: ZTraceElement): ZLayer[A with B with C with D with E with F with G with H with I with J with K with L with M with N with O with P with Q with R with S with T with U with V, Nothing, W]
- def fromFunction[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V](f: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U) => V)(implicit arg0: Tag[A], arg1: Tag[B], arg2: Tag[C], arg3: Tag[D], arg4: Tag[E], arg5: Tag[F], arg6: Tag[G], arg7: Tag[H], arg8: Tag[I], arg9: Tag[J], arg10: Tag[K], arg11: Tag[L], arg12: Tag[M], arg13: Tag[N], arg14: Tag[O], arg15: Tag[P], arg16: Tag[Q], arg17: Tag[R], arg18: Tag[S], arg19: Tag[T], arg20: Tag[U], arg21: Tag[V], trace: ZTraceElement): ZLayer[A with B with C with D with E with F with G with H with I with J with K with L with M with N with O with P with Q with R with S with T with U, Nothing, V]
- def fromFunction[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U](f: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T) => U)(implicit arg0: Tag[A], arg1: Tag[B], arg2: Tag[C], arg3: Tag[D], arg4: Tag[E], arg5: Tag[F], arg6: Tag[G], arg7: Tag[H], arg8: Tag[I], arg9: Tag[J], arg10: Tag[K], arg11: Tag[L], arg12: Tag[M], arg13: Tag[N], arg14: Tag[O], arg15: Tag[P], arg16: Tag[Q], arg17: Tag[R], arg18: Tag[S], arg19: Tag[T], arg20: Tag[U], trace: ZTraceElement): ZLayer[A with B with C with D with E with F with G with H with I with J with K with L with M with N with O with P with Q with R with S with T, Nothing, U]
- def fromFunction[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T](f: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S) => T)(implicit arg0: Tag[A], arg1: Tag[B], arg2: Tag[C], arg3: Tag[D], arg4: Tag[E], arg5: Tag[F], arg6: Tag[G], arg7: Tag[H], arg8: Tag[I], arg9: Tag[J], arg10: Tag[K], arg11: Tag[L], arg12: Tag[M], arg13: Tag[N], arg14: Tag[O], arg15: Tag[P], arg16: Tag[Q], arg17: Tag[R], arg18: Tag[S], arg19: Tag[T], trace: ZTraceElement): ZLayer[A with B with C with D with E with F with G with H with I with J with K with L with M with N with O with P with Q with R with S, Nothing, T]
- def fromFunction[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S](f: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R) => S)(implicit arg0: Tag[A], arg1: Tag[B], arg2: Tag[C], arg3: Tag[D], arg4: Tag[E], arg5: Tag[F], arg6: Tag[G], arg7: Tag[H], arg8: Tag[I], arg9: Tag[J], arg10: Tag[K], arg11: Tag[L], arg12: Tag[M], arg13: Tag[N], arg14: Tag[O], arg15: Tag[P], arg16: Tag[Q], arg17: Tag[R], arg18: Tag[S], trace: ZTraceElement): ZLayer[A with B with C with D with E with F with G with H with I with J with K with L with M with N with O with P with Q with R, Nothing, S]
- def fromFunction[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R](f: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q) => R)(implicit arg0: Tag[A], arg1: Tag[B], arg2: Tag[C], arg3: Tag[D], arg4: Tag[E], arg5: Tag[F], arg6: Tag[G], arg7: Tag[H], arg8: Tag[I], arg9: Tag[J], arg10: Tag[K], arg11: Tag[L], arg12: Tag[M], arg13: Tag[N], arg14: Tag[O], arg15: Tag[P], arg16: Tag[Q], arg17: Tag[R], trace: ZTraceElement): ZLayer[A with B with C with D with E with F with G with H with I with J with K with L with M with N with O with P with Q, Nothing, R]
- def fromFunction[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q](f: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P) => Q)(implicit arg0: Tag[A], arg1: Tag[B], arg2: Tag[C], arg3: Tag[D], arg4: Tag[E], arg5: Tag[F], arg6: Tag[G], arg7: Tag[H], arg8: Tag[I], arg9: Tag[J], arg10: Tag[K], arg11: Tag[L], arg12: Tag[M], arg13: Tag[N], arg14: Tag[O], arg15: Tag[P], arg16: Tag[Q], trace: ZTraceElement): ZLayer[A with B with C with D with E with F with G with H with I with J with K with L with M with N with O with P, Nothing, Q]
- def fromFunction[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P](f: (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O) => P)(implicit arg0: Tag[A], arg1: Tag[B], arg2: Tag[C], arg3: Tag[D], arg4: Tag[E], arg5: Tag[F], arg6: Tag[G], arg7: Tag[H], arg8: Tag[I], arg9: Tag[J], arg10: Tag[K], arg11: Tag[L], arg12: Tag[M], arg13: Tag[N], arg14: Tag[O], arg15: Tag[P], trace: ZTraceElement): ZLayer[A with B with C with D with E with F with G with H with I with J with K with L with M with N with O, Nothing, P]
- def fromFunction[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O](f: (A, B, C, D, E, F, G, H, I, J, K, L, M, N) => O)(implicit arg0: Tag[A], arg1: Tag[B], arg2: Tag[C], arg3: Tag[D], arg4: Tag[E], arg5: Tag[F], arg6: Tag[G], arg7: Tag[H], arg8: Tag[I], arg9: Tag[J], arg10: Tag[K], arg11: Tag[L], arg12: Tag[M], arg13: Tag[N], arg14: Tag[O], trace: ZTraceElement): ZLayer[A with B with C with D with E with F with G with H with I with J with K with L with M with N, Nothing, O]
- def fromFunction[A, B, C, D, E, F, G, H, I, J, K, L, M, N](f: (A, B, C, D, E, F, G, H, I, J, K, L, M) => N)(implicit arg0: Tag[A], arg1: Tag[B], arg2: Tag[C], arg3: Tag[D], arg4: Tag[E], arg5: Tag[F], arg6: Tag[G], arg7: Tag[H], arg8: Tag[I], arg9: Tag[J], arg10: Tag[K], arg11: Tag[L], arg12: Tag[M], arg13: Tag[N], trace: ZTraceElement): ZLayer[A with B with C with D with E with F with G with H with I with J with K with L with M, Nothing, N]
- def fromFunction[A, B, C, D, E, F, G, H, I, J, K, L, M](f: (A, B, C, D, E, F, G, H, I, J, K, L) => M)(implicit arg0: Tag[A], arg1: Tag[B], arg2: Tag[C], arg3: Tag[D], arg4: Tag[E], arg5: Tag[F], arg6: Tag[G], arg7: Tag[H], arg8: Tag[I], arg9: Tag[J], arg10: Tag[K], arg11: Tag[L], arg12: Tag[M], trace: ZTraceElement): ZLayer[A with B with C with D with E with F with G with H with I with J with K with L, Nothing, M]
- def fromFunction[A, B, C, D, E, F, G, H, I, J, K, L](f: (A, B, C, D, E, F, G, H, I, J, K) => L)(implicit arg0: Tag[A], arg1: Tag[B], arg2: Tag[C], arg3: Tag[D], arg4: Tag[E], arg5: Tag[F], arg6: Tag[G], arg7: Tag[H], arg8: Tag[I], arg9: Tag[J], arg10: Tag[K], arg11: Tag[L], trace: ZTraceElement): ZLayer[A with B with C with D with E with F with G with H with I with J with K, Nothing, L]
- def fromFunction[A, B, C, D, E, F, G, H, I, J, K](f: (A, B, C, D, E, F, G, H, I, J) => K)(implicit arg0: Tag[A], arg1: Tag[B], arg2: Tag[C], arg3: Tag[D], arg4: Tag[E], arg5: Tag[F], arg6: Tag[G], arg7: Tag[H], arg8: Tag[I], arg9: Tag[J], arg10: Tag[K], trace: ZTraceElement): ZLayer[A with B with C with D with E with F with G with H with I with J, Nothing, K]
- def fromFunction[A, B, C, D, E, F, G, H, I, J](f: (A, B, C, D, E, F, G, H, I) => J)(implicit arg0: Tag[A], arg1: Tag[B], arg2: Tag[C], arg3: Tag[D], arg4: Tag[E], arg5: Tag[F], arg6: Tag[G], arg7: Tag[H], arg8: Tag[I], arg9: Tag[J], trace: ZTraceElement): ZLayer[A with B with C with D with E with F with G with H with I, Nothing, J]
- def fromFunction[A, B, C, D, E, F, G, H, I](f: (A, B, C, D, E, F, G, H) => I)(implicit arg0: Tag[A], arg1: Tag[B], arg2: Tag[C], arg3: Tag[D], arg4: Tag[E], arg5: Tag[F], arg6: Tag[G], arg7: Tag[H], arg8: Tag[I], trace: ZTraceElement): ZLayer[A with B with C with D with E with F with G with H, Nothing, I]
- def fromFunction[A, B, C, D, E, F, G, H](f: (A, B, C, D, E, F, G) => H)(implicit arg0: Tag[A], arg1: Tag[B], arg2: Tag[C], arg3: Tag[D], arg4: Tag[E], arg5: Tag[F], arg6: Tag[G], arg7: Tag[H], trace: ZTraceElement): ZLayer[A with B with C with D with E with F with G, Nothing, H]
- def fromFunction[A, B, C, D, E, F, G](f: (A, B, C, D, E, F) => G)(implicit arg0: Tag[A], arg1: Tag[B], arg2: Tag[C], arg3: Tag[D], arg4: Tag[E], arg5: Tag[F], arg6: Tag[G], trace: ZTraceElement): ZLayer[A with B with C with D with E with F, Nothing, G]
- def fromFunction[A, B, C, D, E, F](f: (A, B, C, D, E) => F)(implicit arg0: Tag[A], arg1: Tag[B], arg2: Tag[C], arg3: Tag[D], arg4: Tag[E], arg5: Tag[F], trace: ZTraceElement): ZLayer[A with B with C with D with E, Nothing, F]
- def fromFunction[A, B, C, D, E](f: (A, B, C, D) => E)(implicit arg0: Tag[A], arg1: Tag[B], arg2: Tag[C], arg3: Tag[D], arg4: Tag[E], trace: ZTraceElement): ZLayer[A with B with C with D, Nothing, E]
- def fromFunction[A, B, C, D](f: (A, B, C) => D)(implicit arg0: Tag[A], arg1: Tag[B], arg2: Tag[C], arg3: Tag[D], trace: ZTraceElement): ZLayer[A with B with C, Nothing, D]
- def fromFunction[A, B, C](f: (A, B) => C)(implicit arg0: Tag[A], arg1: Tag[B], arg2: Tag[C], trace: ZTraceElement): ZLayer[A with B, Nothing, C]
- def fromFunction[A, B](f: (A) => B)(implicit arg0: Tag[A], arg1: Tag[B], trace: ZTraceElement): ZLayer[A, Nothing, B]
Constructs a layer using the specified function.
- def fromZIO[R, E, A](zio: ZIO[R, E, A])(implicit arg0: Tag[A], trace: ZTraceElement): ZLayer[R, E, A]
Constructs a layer from the specified effect.
- def fromZIOEnvironment[R, E, A](zio: ZIO[R, E, ZEnvironment[A]])(implicit trace: ZTraceElement): ZLayer[R, E, A]
Constructs a layer from the specified effect, which must return one or more services.
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- 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
- def makeSome[R0, R]: MakeSomePartiallyApplied[R0, R]
Automatically constructs a layer for the provided type
R
, leaving a remainderR0
.Automatically constructs a layer for the provided type
R
, leaving a remainderR0
.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
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- val scope: ZLayer[Any, Nothing, Closeable]
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.
- def scoped[R]: ScopedPartiallyApplied[R]
Constructs a layer from the specified scoped effect.
- def scopedEnvironment[R]: ScopedEnvironmentPartiallyApplied[R]
Constructs a layer from the specified scoped effect, which must return one or more services.
- def service[A](implicit arg0: Tag[A], trace: ZTraceElement): ZLayer[A, Nothing, A]
Constructs a layer that accesses and returns the specified service from the environment.
- def succeed[A](a: A)(implicit arg0: Tag[A], trace: ZTraceElement): ULayer[A]
Constructs a layer from the specified value.
- def succeedEnvironment[A](a: ZEnvironment[A])(implicit trace: ZTraceElement): ULayer[A]
Constructs a layer from the specified value, which must return one or more services.
- 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.
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- object Debug