Packages

sealed trait Exit[+E, +A] extends ZIO[Any, E, A]

An Exit[E, A] describes the result of executing an IO value. The result is either succeeded with a value A, or failed with a Cause[E].

Self Type
Exit[E, A]
Linear Supertypes
ZIO[Any, E, A], ZIOVersionSpecific[Any, E, A], ZIOPlatformSpecific[Any, E, A], Serializable, Product, Equals, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Exit
  2. ZIO
  3. ZIOVersionSpecific
  4. ZIOPlatformSpecific
  5. Serializable
  6. Product
  7. Equals
  8. AnyRef
  9. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. abstract def canEqual(that: Any): Boolean
    Definition Classes
    Equals
  2. abstract def productArity: Int
    Definition Classes
    Product
  3. abstract def productElement(n: Int): Any
    Definition Classes
    Product

Concrete Value Members

  1. final def !(implicit ev1: <:<[E, Throwable], ev2: CanFail[E], trace: Trace): ZIO[Any, Nothing, A]

    A symbolic alias for orDie.

    A symbolic alias for orDie.

    Definition Classes
    ZIO
  2. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  3. final def ##: Int
    Definition Classes
    AnyRef → Any
  4. final def &>[E1 >: E, B](that: Exit[E1, B]): Exit[E1, B]

    Parallelly zips the this result with the specified result discarding the first element of the tuple or else returns the failed Cause[E1]

  5. final def &>[R1 <: Any, E1 >: E, B](that: => ZIO[R1, E1, B])(implicit trace: Trace): ZIO[R1, E1, B]

    Returns an effect that executes both this effect and the specified effect, in parallel, returning result of provided effect.

    Returns an effect that executes both this effect and the specified effect, in parallel, returning result of provided effect. If either side fails, then the other side will be interrupted.

    Definition Classes
    ZIO
  6. final def *>[E1 >: E, B](that: Exit[E1, B]): Exit[E1, B]

    Sequentially zips the this result with the specified result discarding the first element of the tuple or else returns the failed Cause[E1]

  7. final def *>[R1 <: Any, E1 >: E, B](that: => ZIO[R1, E1, B])(implicit trace: Trace): ZIO[R1, E1, B]

    A variant of flatMap that ignores the value produced by this effect.

    A variant of flatMap that ignores the value produced by this effect.

    Definition Classes
    ZIO
  8. final def <&[E1 >: E, B](that: Exit[E1, B]): Exit[E1, A]

    Parallelly zips the this result with the specified result discarding the second element of the tuple or else returns the failed Cause[E1]

  9. final def <&[R1 <: Any, E1 >: E, B](that: => ZIO[R1, E1, B])(implicit trace: Trace): ZIO[R1, E1, A]

    Returns an effect that executes both this effect and the specified effect, in parallel, this effect result returned.

    Returns an effect that executes both this effect and the specified effect, in parallel, this effect result returned. If either side fails, then the other side will be interrupted.

    Definition Classes
    ZIO
  10. final def <&>[E1 >: E, B](that: Exit[E1, B])(implicit zippable: Zippable[A, B]): Exit[E1, Out]

    Parallelly zips the this result with the specified result or else returns the failed Cause[E1]

  11. final def <&>[R1 <: Any, E1 >: E, B](that: => ZIO[R1, E1, B])(implicit zippable: Zippable[A, B], trace: Trace): ZIO[R1, E1, Out]

    Returns an effect that executes both this effect and the specified effect, in parallel, combining their results into a tuple.

    Returns an effect that executes both this effect and the specified effect, in parallel, combining their results into a tuple. If either side fails, then the other side will be interrupted.

    Definition Classes
    ZIO
  12. final def <*[E1 >: E, B](that: Exit[E1, B]): Exit[E1, A]

    Sequentially zips the this result with the specified result discarding the second element of the tuple or else returns the failed Cause[E1]

  13. final def <*[R1 <: Any, E1 >: E, B](that: => ZIO[R1, E1, B])(implicit trace: Trace): ZIO[R1, E1, A]

    Sequences the specified effect after this effect, but ignores the value produced by the effect.

    Sequences the specified effect after this effect, but ignores the value produced by the effect.

    Definition Classes
    ZIO
  14. final def <*>[E1 >: E, B](that: Exit[E1, B])(implicit zippable: Zippable[A, B]): Exit[E1, Out]

    Sequentially zips the this result with the specified result or else returns the failed Cause[E1]

  15. final def <*>[R1 <: Any, E1 >: E, B](that: => ZIO[R1, E1, B])(implicit zippable: Zippable[A, B], trace: Trace): ZIO[R1, E1, Out]

    Sequentially zips this effect with the specified effect, combining the results into a tuple.

    Sequentially zips this effect with the specified effect, combining the results into a tuple.

    Definition Classes
    ZIO
  16. final def <+>[R1 <: Any, E1, B](that: => ZIO[R1, E1, B])(implicit ev: CanFail[E], trace: Trace): ZIO[R1, E1, Either[A, B]]

    A symbolic alias for orElseEither.

    A symbolic alias for orElseEither.

    Definition Classes
    ZIO
  17. final def <>[R1 <: Any, E2, A1 >: A](that: => ZIO[R1, E2, A1])(implicit ev: CanFail[E], trace: Trace): ZIO[R1, E2, A1]

    Operator alias for orElse.

    Operator alias for orElse.

    Definition Classes
    ZIO
  18. final def <|>[R1 <: Any, E1 >: E, B](that: => ZIO[R1, E1, B])(implicit trace: Trace): ZIO[R1, E1, Either[A, B]]

    A symbolic alias for raceEither.

    A symbolic alias for raceEither.

    Definition Classes
    ZIO
  19. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  20. final def @@[LowerR <: UpperR, UpperR <: Any, LowerE >: E, UpperE >: LowerE, LowerA >: A, UpperA >: LowerA](aspect: => ZIOAspect[LowerR, UpperR, LowerE, UpperE, LowerA, UpperA])(implicit trace: Trace): ZIO[UpperR, LowerE, LowerA]

    Returns a new effect that applies the specified aspect to this effect.

    Returns a new effect that applies the specified aspect to this effect. Aspects are "transformers" that modify the behavior of their input in some well-defined way (for example, adding a timeout).

    Definition Classes
    ZIO
  21. final def absolve[E1 >: E, B](implicit ev: IsSubtypeOfOutput[A, Either[E1, B]], trace: Trace): ZIO[Any, E1, B]

    Returns an effect that submerges the error case of an Either into the ZIO.

    Returns an effect that submerges the error case of an Either into the ZIO. The inverse operation of ZIO.either.

    Definition Classes
    ZIO
  22. final def absorb(implicit ev: IsSubtypeOfError[E, Throwable], trace: Trace): RIO[Any, A]

    Attempts to convert defects into a failure, throwing away all information about the cause of the failure.

    Attempts to convert defects into a failure, throwing away all information about the cause of the failure.

    Definition Classes
    ZIO
  23. final def absorbWith(f: (E) => Throwable)(implicit trace: Trace): RIO[Any, A]

    Attempts to convert defects into a failure, throwing away all information about the cause of the failure.

    Attempts to convert defects into a failure, throwing away all information about the cause of the failure.

    Definition Classes
    ZIO
  24. final def as[B](b: => B)(implicit trace: Trace): ZIO[Any, E, B]

    Maps the success value of this effect to the specified constant value.

    Maps the success value of this effect to the specified constant value.

    Definition Classes
    ExitZIO
  25. final def asExit[B](b: B): Exit[E, B]

    Replaces the success value with the one provided.

  26. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  27. final def asLeft(implicit trace: Trace): ZIO[Any, E, Either[A, Nothing]]

    Maps the success value of this effect to a left value.

    Maps the success value of this effect to a left value.

    Definition Classes
    ZIO
  28. final def asLeftError(implicit trace: Trace): ZIO[Any, Either[E, Nothing], A]

    Maps the error value of this effect to a left value.

    Maps the error value of this effect to a left value.

    Definition Classes
    ZIO
  29. final def asRight(implicit trace: Trace): ZIO[Any, E, Either[Nothing, A]]

    Maps the success value of this effect to a right value.

    Maps the success value of this effect to a right value.

    Definition Classes
    ZIO
  30. final def asRightError(implicit trace: Trace): ZIO[Any, Either[Nothing, E], A]

    Maps the error value of this effect to a right value.

    Maps the error value of this effect to a right value.

    Definition Classes
    ZIO
  31. final def asSome(implicit trace: Trace): ZIO[Any, E, Option[A]]

    Maps the success value of this effect to an optional value.

    Maps the success value of this effect to an optional value.

    Definition Classes
    ZIO
  32. final def asSomeError(implicit trace: Trace): ZIO[Any, Option[E], A]

    Maps the error value of this effect to an optional value.

    Maps the error value of this effect to an optional value.

    Definition Classes
    ZIO
  33. final def awaitAllChildren(implicit trace: Trace): ZIO[Any, E, A]

    Returns a new effect that will not succeed with its value before first waiting for the end of all child fibers forked by the effect.

    Returns a new effect that will not succeed with its value before first waiting for the end of all child fibers forked by the effect.

    Definition Classes
    ZIO
  34. final def cached(timeToLive: => zio.Duration)(implicit trace: Trace): ZIO[Any, Nothing, IO[E, A]]

    Returns an effect that, if evaluated, will return the cached result of this effect.

    Returns an effect that, if evaluated, will return the cached result of this effect. Cached results will expire after timeToLive duration.

    Definition Classes
    ZIO
  35. final def cachedInvalidate(timeToLive0: => zio.Duration)(implicit trace: Trace): ZIO[Any, Nothing, (IO[E, A], UIO[Unit])]

    Returns an effect that, if evaluated, will return the cached result of this effect.

    Returns an effect that, if evaluated, will return the cached result of this effect. Cached results will expire after timeToLive duration. In addition, returns an effect that can be used to invalidate the current cached value before the timeToLive duration expires.

    Definition Classes
    ZIO
  36. final def catchAll[R1 <: Any, E2, A1 >: A](h: (E) => ZIO[R1, E2, A1])(implicit ev: CanFail[E], trace: Trace): ZIO[R1, E2, A1]

    Recovers from all errors.

    Recovers from all errors.

    openFile("config.json").catchAll(_ => ZIO.succeed(defaultConfig))
    Definition Classes
    ZIO
  37. final def catchAllCause[R1 <: Any, E2, A1 >: A](k: (Cause[E]) => ZIO[R1, E2, A1])(implicit trace: Trace): ZIO[R1, E2, A1]

    Recovers from all errors with provided Cause.

    Recovers from all errors with provided Cause.

    openFile("config.json").catchAllCause(_ => ZIO.succeed(defaultConfig))
    Definition Classes
    ZIO
    See also

    absorb, sandbox, mapErrorCause - other functions that can recover from defects

  38. final def catchAllDefect[R1 <: Any, E1 >: E, A1 >: A](h: (Throwable) => ZIO[R1, E1, A1])(implicit trace: Trace): ZIO[R1, E1, A1]

    Recovers from all defects with provided function.

    Recovers from all defects with provided function.

    effect.catchSomeDefect(_ => backup())

    WARNING: There is no sensible way to recover from defects. This method should be used only at the boundary between ZIO and an external system, to transmit information on a defect for diagnostic or explanatory purposes.

    Definition Classes
    ZIO
  39. final def catchAllTrace[R1 <: Any, E2, A1 >: A](h: ((E, StackTrace)) => ZIO[R1, E2, A1])(implicit ev: CanFail[E], trace: Trace): ZIO[R1, E2, A1]

    A version of catchAll that gives you the (optional) trace of the error.

    A version of catchAll that gives you the (optional) trace of the error.

    Definition Classes
    ZIO
  40. final def catchNonFatalOrDie[R1 <: Any, E2, A1 >: A](h: (E) => ZIO[R1, E2, A1])(implicit ev1: CanFail[E], ev2: <:<[E, Throwable], trace: Trace): ZIO[R1, E2, A1]

    Recovers from all NonFatal Throwables.

    Recovers from all NonFatal Throwables.

    openFile("data.json").catchNonFatalOrDie(_ => openFile("backup.json"))
    Definition Classes
    ZIO
  41. final def catchSome[R1 <: Any, E1 >: E, A1 >: A](pf: PartialFunction[E, ZIO[R1, E1, A1]])(implicit ev: CanFail[E], trace: Trace): ZIO[R1, E1, A1]

    Recovers from some or all of the error cases.

    Recovers from some or all of the error cases.

    openFile("data.json").catchSome {
      case _: FileNotFoundException => openFile("backup.json")
    }
    Definition Classes
    ZIO
  42. final def catchSomeCause[R1 <: Any, E1 >: E, A1 >: A](pf: PartialFunction[Cause[E], ZIO[R1, E1, A1]])(implicit trace: Trace): ZIO[R1, E1, A1]

    Recovers from some or all of the error cases with provided cause.

    Recovers from some or all of the error cases with provided cause.

    openFile("data.json").catchSomeCause {
      case c if (c.interrupted) => openFile("backup.json")
    }
    Definition Classes
    ZIO
  43. final def catchSomeDefect[R1 <: Any, E1 >: E, A1 >: A](pf: PartialFunction[Throwable, ZIO[R1, E1, A1]])(implicit trace: Trace): ZIO[R1, E1, A1]

    Recovers from some or all of the defects with provided partial function.

    Recovers from some or all of the defects with provided partial function.

    effect.catchSomeDefect {
      case _: SecurityException => backup()
    }

    WARNING: There is no sensible way to recover from defects. This method should be used only at the boundary between ZIO and an external system, to transmit information on a defect for diagnostic or explanatory purposes.

    Definition Classes
    ZIO
  44. final def catchSomeTrace[R1 <: Any, E1 >: E, A1 >: A](pf: PartialFunction[(E, StackTrace), ZIO[R1, E1, A1]])(implicit ev: CanFail[E], trace: Trace): ZIO[R1, E1, A1]

    A version of catchSome that gives you the trace of the error.

    A version of catchSome that gives you the trace of the error.

    Definition Classes
    ZIO
  45. final def cause(implicit trace: Trace): URIO[Any, Cause[E]]

    Returns an effect that succeeds with the cause of failure of this effect, or Cause.empty if the effect did succeed.

    Returns an effect that succeeds with the cause of failure of this effect, or Cause.empty if the effect did succeed.

    Definition Classes
    ZIO
  46. final def causeOption: Option[Cause[E]]

    Returns an option of the cause of failure.

  47. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  48. final def collect[E1 >: E, B](e: => E1)(pf: PartialFunction[A, B])(implicit trace: Trace): ZIO[Any, E1, B]

    Fail with e if the supplied PartialFunction does not match, otherwise succeed with the returned value.

    Fail with e if the supplied PartialFunction does not match, otherwise succeed with the returned value.

    Definition Classes
    ZIO
  49. final def collectZIO[R1 <: Any, E1 >: E, B](e: => E1)(pf: PartialFunction[A, ZIO[R1, E1, B]])(implicit trace: Trace): ZIO[R1, E1, B]

    Fail with e if the supplied PartialFunction does not match, otherwise continue with the returned value.

    Fail with e if the supplied PartialFunction does not match, otherwise continue with the returned value.

    Definition Classes
    ZIO
  50. final def daemonChildren(implicit trace: Trace): ZIO[Any, E, A]

    Returns a new effect that will not supervise any fibers forked by this effect.

    Returns a new effect that will not supervise any fibers forked by this effect.

    Definition Classes
    ZIO
  51. final def debug(prefix: => String)(implicit trace: Trace): ZIO[Any, E, A]

    Taps the effect, printing the result of calling .toString on the value.

    Taps the effect, printing the result of calling .toString on the value. Prefixes the output with the given message.

    Definition Classes
    ZIO
  52. final def debug(implicit trace: Trace): ZIO[Any, E, A]

    Taps the effect, printing the result of calling .toString on the value.

    Taps the effect, printing the result of calling .toString on the value.

    Definition Classes
    ZIO
  53. final def delay(duration: => zio.Duration)(implicit trace: Trace): ZIO[Any, E, A]

    Returns an effect that is delayed from this effect by the specified zio.Duration.

    Returns an effect that is delayed from this effect by the specified zio.Duration.

    Definition Classes
    ZIO
  54. def diffFiberRefs(implicit trace: Trace): ZIO[Any, E, (Patch, A)]

    Returns a new workflow that executes this one and captures the changes in FiberRef values.

    Returns a new workflow that executes this one and captures the changes in FiberRef values.

    Definition Classes
    ZIO
  55. final def disconnect(implicit trace: Trace): ZIO[Any, E, A]

    Returns an effect that is always interruptible, but whose interruption will be performed in the background.

    Returns an effect that is always interruptible, but whose interruption will be performed in the background.

    This method is useful to create "fast interrupting" effects. For example, if you call this on an acquire release effect, then even if the effect is "stuck" in acquire or release, its interruption will return immediately, while the acquire / release are performed in the background.

    See timeout and race for other applications.

    Definition Classes
    ZIO
  56. final def either(implicit ev: CanFail[E], trace: Trace): URIO[Any, Either[E, A]]

    Returns an effect whose failure and success have been lifted into an Either.

    Returns an effect whose failure and success have been lifted into an Either. The resulting effect cannot fail, because the failure case has been exposed as part of the Either success case.

    This method is useful for recovering from ZIO effects that may fail.

    The error parameter of the returned ZIO is Nothing, since it is guaranteed the ZIO effect does not model failure.

    Definition Classes
    ZIO
  57. final def ensuring[R1 <: Any](finalizer: => URIO[R1, Any])(implicit trace: Trace): ZIO[R1, E, A]

    Returns an effect that, if this effect _starts_ execution, then the specified finalizer is guaranteed to begin execution, whether this effect succeeds, fails, or is interrupted.

    Returns an effect that, if this effect _starts_ execution, then the specified finalizer is guaranteed to begin execution, whether this effect succeeds, fails, or is interrupted.

    For use cases that need access to the effect's result, see ZIO#onExit.

    Finalizers offer very powerful guarantees, but they are low-level, and should generally not be used for releasing resources. For higher-level logic built on ensuring, see ZIO#acquireReleaseWith.

    Definition Classes
    ZIO
  58. final def ensuringChild[R1 <: Any](f: (Fiber[Any, Iterable[Any]]) => ZIO[R1, Nothing, Any])(implicit trace: Trace): ZIO[R1, E, A]

    Acts on the children of this fiber (collected into a single fiber), guaranteeing the specified callback will be invoked, whether or not this effect succeeds.

    Acts on the children of this fiber (collected into a single fiber), guaranteeing the specified callback will be invoked, whether or not this effect succeeds.

    Definition Classes
    ZIO
  59. def ensuringChildren[R1 <: Any](children: (Chunk[Fiber.Runtime[Any, Any]]) => ZIO[R1, Nothing, Any])(implicit trace: Trace): ZIO[R1, E, A]

    Acts on the children of this fiber, guaranteeing the specified callback will be invoked, whether or not this effect succeeds.

    Acts on the children of this fiber, guaranteeing the specified callback will be invoked, whether or not this effect succeeds.

    Definition Classes
    ZIO
  60. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  61. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  62. final def eventually(implicit ev: CanFail[E], trace: Trace): URIO[Any, A]

    Returns an effect that ignores errors and runs repeatedly until it eventually succeeds.

    Returns an effect that ignores errors and runs repeatedly until it eventually succeeds.

    Definition Classes
    ZIO
  63. final def exists(p: (A) => Boolean): Boolean
  64. final def exit(implicit trace: Trace): URIO[Any, Exit[E, A]]

    Returns an effect that semantically runs the effect on a fiber, producing an zio.Exit for the completion value of the fiber.

    Returns an effect that semantically runs the effect on a fiber, producing an zio.Exit for the completion value of the fiber.

    Definition Classes
    ZIO
  65. final def exitCode(implicit trace: Trace): URIO[Any, ExitCode]

    Maps this effect to the default exit codes.

    Maps this effect to the default exit codes.

    Definition Classes
    ZIO
  66. final def exitWith[R1 <: Any, E1, B](f: (Exit[E, A]) => ZIO[R1, E1, B])(implicit trace: Trace): ZIO[R1, E1, B]

    Extracts this effect as an zio.Exit and then applies the provided function to produce a new effect

    Extracts this effect as an zio.Exit and then applies the provided function to produce a new effect

    Definition Classes
    ZIO
  67. final def filterOrDie(p: (A) => Boolean)(t: => Throwable)(implicit trace: Trace): ZIO[Any, E, A]

    Dies with specified Throwable if the predicate fails.

    Dies with specified Throwable if the predicate fails.

    Definition Classes
    ZIO
  68. final def filterOrDieMessage(p: (A) => Boolean)(message: => String)(implicit trace: Trace): ZIO[Any, E, A]

    Dies with a java.lang.RuntimeException having the specified text message if the predicate fails.

    Dies with a java.lang.RuntimeException having the specified text message if the predicate fails.

    Definition Classes
    ZIO
  69. final def filterOrDieWith(p: (A) => Boolean)(t: (A) => Throwable)(implicit trace: Trace): ZIO[Any, E, A]

    Dies with t if the predicate fails.

    Dies with t if the predicate fails.

    Definition Classes
    ZIO
  70. final def filterOrElse[R1 <: Any, E1 >: E, A1 >: A](p: (A) => Boolean)(zio: => ZIO[R1, E1, A1])(implicit trace: Trace): ZIO[R1, E1, A1]

    Supplies zio if the predicate fails.

    Supplies zio if the predicate fails.

    Definition Classes
    ZIO
  71. final def filterOrElseWith[R1 <: Any, E1 >: E, A1 >: A](p: (A) => Boolean)(f: (A) => ZIO[R1, E1, A1])(implicit trace: Trace): ZIO[R1, E1, A1]

    Applies f if the predicate fails.

    Applies f if the predicate fails.

    Definition Classes
    ZIO
  72. final def filterOrFail[E1 >: E](p: (A) => Boolean)(e: => E1)(implicit trace: Trace): ZIO[Any, E1, A]

    Fails with e if the predicate fails.

    Fails with e if the predicate fails.

    Definition Classes
    ZIO
  73. final def firstSuccessOf[R1 <: Any, E1 >: E, A1 >: A](rest: => Iterable[ZIO[R1, E1, A1]])(implicit trace: Trace): ZIO[R1, E1, A1]

    Returns an effect that runs this effect and in case of failure, runs each of the specified effects in order until one of them succeeds.

    Returns an effect that runs this effect and in case of failure, runs each of the specified effects in order until one of them succeeds.

    Definition Classes
    ZIO
  74. final def flatMap[R1, E1 >: E, B](k: (A) => ZIO[R1, E1, B])(implicit trace: Trace): ZIO[R1, E1, B]

    Returns an effect that models the execution of this effect, followed by the passing of its value to the specified continuation function k, followed by the effect that it returns.

    Returns an effect that models the execution of this effect, followed by the passing of its value to the specified continuation function k, followed by the effect that it returns.

    val parsed = readFile("foo.txt").flatMap(file => parseFile(file))
    Definition Classes
    ExitZIO
  75. final def flatMapError[R1 <: Any, E2](f: (E) => URIO[R1, E2])(implicit ev: CanFail[E], trace: Trace): ZIO[R1, E2, A]

    Creates a composite effect that represents this effect followed by another one that may depend on the error produced by this one.

    Creates a composite effect that represents this effect followed by another one that may depend on the error produced by this one.

    val parsed = readFile("foo.txt").flatMapError(error => logErrorToFile(error))
    Definition Classes
    ZIO
  76. final def flatMapExit[E1 >: E, A1](f: (A) => Exit[E1, A1]): Exit[E1, A1]

    Flat maps over the value type.

  77. final def flatMapExitZIO[E1 >: E, R, E2, A1](f: (A) => ZIO[R, E2, Exit[E1, A1]]): ZIO[R, E2, Exit[E1, A1]]

    Flat maps over the value type.

  78. final def flatten[R1 <: Any, E1 >: E, B](implicit ev1: IsSubtypeOfOutput[A, ZIO[R1, E1, B]], trace: Trace): ZIO[R1, E1, B]

    Returns an effect that performs the outer effect first, followed by the inner effect, yielding the value of the inner effect.

    Returns an effect that performs the outer effect first, followed by the inner effect, yielding the value of the inner effect.

    This method can be used to "flatten" nested effects.

    Definition Classes
    ZIO
  79. final def flattenErrorOption[E1, E2 <: E1](default: => E2)(implicit ev: IsSubtypeOfError[E, Option[E1]], trace: Trace): ZIO[Any, E1, A]

    Unwraps the optional error, defaulting to the provided value.

    Unwraps the optional error, defaulting to the provided value.

    Definition Classes
    ZIO
  80. final def flattenExit[E1 >: E, B](implicit ev: <:<[A, Exit[E1, B]]): Exit[E1, B]

    Flattens an Exit of an Exit into a single Exit value.

  81. final def flip(implicit trace: Trace): ZIO[Any, A, E]

    Returns an effect that swaps the error/success cases.

    Returns an effect that swaps the error/success cases. This allows you to use all methods on the error channel, possibly before flipping back.

    Definition Classes
    ZIO
  82. final def flipWith[R1, A1, E1](f: (ZIO[Any, A, E]) => ZIO[R1, A1, E1])(implicit trace: Trace): ZIO[R1, E1, A1]

    Swaps the error/value parameters, applies the function f and flips the parameters back

    Swaps the error/value parameters, applies the function f and flips the parameters back

    Definition Classes
    ZIO
  83. final def fold[B](failure: (E) => B, success: (A) => B)(implicit ev: CanFail[E], trace: Trace): UIO[B]

    Folds over the failure value or the success value to yield an effect that does not fail, but succeeds with the value returned by the left or right function passed to fold.

    Folds over the failure value or the success value to yield an effect that does not fail, but succeeds with the value returned by the left or right function passed to fold.

    Definition Classes
    ExitZIO
  84. final def foldCause[B](failure: (Cause[E]) => B, success: (A) => B)(implicit trace: Trace): UIO[B]

    A more powerful version of fold that allows recovering from any kind of failure except external interruption.

    A more powerful version of fold that allows recovering from any kind of failure except external interruption.

    Definition Classes
    ExitZIO
  85. final def foldCauseZIO[R, E2, B](failure: (Cause[E]) => ZIO[R, E2, B], success: (A) => ZIO[R, E2, B])(implicit trace: Trace): ZIO[R, E2, B]

    A more powerful version of foldZIO that allows recovering from any kind of failure except external interruption.

    A more powerful version of foldZIO that allows recovering from any kind of failure except external interruption.

    Definition Classes
    ExitZIO
  86. final def foldExit[Z](failed: (Cause[E]) => Z, completed: (A) => Z): Z

    Folds over the value or cause.

  87. final def foldExitZIO[R, E1, B](failed: (Cause[E]) => ZIO[R, E1, B], completed: (A) => ZIO[R, E1, B])(implicit trace: Trace): ZIO[R, E1, B]

    Sequentially zips the this result with the specified result or else returns the failed Cause[E1]

  88. final def foldTraceZIO[R1 <: Any, E2, B](failure: ((E, StackTrace)) => ZIO[R1, E2, B], success: (A) => ZIO[R1, E2, B])(implicit ev: CanFail[E], trace: Trace): ZIO[R1, E2, B]

    A version of foldZIO that gives you the trace of the error.

    A version of foldZIO that gives you the trace of the error.

    Definition Classes
    ZIO
  89. final def foldZIO[R1 <: Any, E2, B](failure: (E) => ZIO[R1, E2, B], success: (A) => ZIO[R1, E2, B])(implicit ev: CanFail[E], trace: Trace): ZIO[R1, E2, B]

    Recovers from errors by accepting one effect to execute for the case of an error, and one effect to execute for the case of success.

    Recovers from errors by accepting one effect to execute for the case of an error, and one effect to execute for the case of success.

    This method has better performance than either since no intermediate value is allocated and does not require subsequent calls to flatMap to define the next effect.

    The error parameter of the returned IO may be chosen arbitrarily, since it will depend on the IOs returned by the given continuations.

    Definition Classes
    ZIO
  90. final def forEachZIO[R1 <: Any, E2, B](f: (A) => ZIO[R1, E2, B])(implicit trace: Trace): ZIO[R1, E2, Option[B]]

    Returns a new effect that will pass the success value of this effect to the provided callback.

    Returns a new effect that will pass the success value of this effect to the provided callback. If this effect fails, then the failure will be ignored.

    Definition Classes
    ZIO
  91. final def foreach[R, E1 >: E, B](f: (A) => ZIO[R, E1, B])(implicit trace: Trace): ZIO[R, Nothing, Exit[E1, B]]

    Applies the function f to the successful result of the Exit and returns the result in a new Exit.

  92. final def forever(implicit trace: Trace): ZIO[Any, E, Nothing]
    Definition Classes
    ZIO
  93. final def fork(implicit trace: Trace): URIO[Any, Fiber.Runtime[E, A]]

    Returns an effect that forks this effect into its own separate fiber, returning the fiber immediately, without waiting for it to begin executing the effect.

    Returns an effect that forks this effect into its own separate fiber, returning the fiber immediately, without waiting for it to begin executing the effect.

    You can use the fork method whenever you want to execute an effect in a new fiber, concurrently and without "blocking" the fiber executing other effects. Using fibers can be tricky, so instead of using this method directly, consider other higher-level methods, such as raceWith, zipPar, and so forth.

    The fiber returned by this method has methods to interrupt the fiber and to wait for it to finish executing the effect. See zio.Fiber for more information.

    Whenever you use this method to launch a new fiber, the new fiber is attached to the parent fiber's scope. This means when the parent fiber terminates, the child fiber will be terminated as well, ensuring that no fibers leak. This behavior is called "auto supervision", and if this behavior is not desired, you may use the forkDaemon or forkIn methods.

    for {
      fiber <- subtask.fork
      // Do stuff...
      a <- fiber.join
    } yield a
    Definition Classes
    ZIO
  94. final def forkDaemon(implicit trace: Trace): URIO[Any, Fiber.Runtime[E, A]]

    Forks the effect into a new fiber attached to the global scope.

    Forks the effect into a new fiber attached to the global scope. Because the new fiber is attached to the global scope, when the fiber executing the returned effect terminates, the forked fiber will continue running.

    Definition Classes
    ZIO
  95. final def forkIn(scope: => Scope)(implicit trace: Trace): URIO[Any, Fiber.Runtime[E, A]]

    Forks the effect in the specified scope.

    Forks the effect in the specified scope. The fiber will be interrupted when the scope is closed.

    Definition Classes
    ZIO
  96. final def forkScoped(implicit trace: Trace): ZIO[Scope, Nothing, Fiber.Runtime[E, A]]

    Forks the fiber in a Scope, interrupting it when the scope is closed.

    Forks the fiber in a Scope, interrupting it when the scope is closed.

    Definition Classes
    ZIO
  97. final def forkWithErrorHandler[R1 <: Any](handler: (E) => URIO[R1, Any])(implicit trace: Trace): URIO[R1, Fiber.Runtime[E, A]]

    Like fork but handles an error with the provided handler.

    Like fork but handles an error with the provided handler.

    Definition Classes
    ZIO
  98. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  99. final def getOrElse[A1 >: A](orElse: (Cause[E]) => A1): A1

    Retrieves the A if succeeded, or else returns the specified default A.

  100. final def getOrThrow()(implicit ev: <:<[E, Throwable], unsafe: Unsafe): A
  101. final def getOrThrowFiberFailure()(implicit unsafe: Unsafe): A
  102. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  103. final def head[B](implicit ev: IsSubtypeOfOutput[A, List[B]], trace: Trace): ZIO[Any, Option[E], B]

    Returns a successful effect with the head of the list if the list is non-empty or fails with the error None if the list is empty.

    Returns a successful effect with the head of the list if the list is non-empty or fails with the error None if the list is empty.

    Definition Classes
    ZIO
  104. final def ignore(implicit trace: Trace): URIO[Any, Unit]

    Returns a new effect that ignores the success or failure of this effect.

    Returns a new effect that ignores the success or failure of this effect.

    Definition Classes
    ZIO
  105. final def ignoreLogged(implicit trace: Trace): URIO[Any, Unit]

    Returns a new effect that ignores the success or failure of this effect, but which also logs failures at the Debug level, just in case the failure turns out to be important.

    Returns a new effect that ignores the success or failure of this effect, but which also logs failures at the Debug level, just in case the failure turns out to be important.

    Definition Classes
    ZIO
  106. final def interruptAllChildren(implicit trace: Trace): ZIO[Any, E, A]

    Returns a new effect that will not succeed with its value before first interrupting all child fibers forked by the effect.

    Returns a new effect that will not succeed with its value before first interrupting all child fibers forked by the effect.

    Definition Classes
    ZIO
  107. final def interruptStatus(flag: => InterruptStatus)(implicit trace: Trace): ZIO[Any, E, A]

    Switches the interrupt status for this effect.

    Switches the interrupt status for this effect. If true is used, then the effect becomes interruptible (the default), while if false is used, then the effect becomes uninterruptible. These changes are compositional, so they only affect regions of the effect.

    Definition Classes
    ZIO
  108. final def interruptible(implicit trace: Trace): ZIO[Any, E, A]

    Returns a new effect that performs the same operations as this effect, but interruptibly, even if composed inside of an uninterruptible region.

    Returns a new effect that performs the same operations as this effect, but interruptibly, even if composed inside of an uninterruptible region.

    Note that effects are interruptible by default, so this function only has meaning if used within an uninterruptible region.

    WARNING: This operator "punches holes" into effects, allowing them to be interrupted in unexpected places. Do not use this operator unless you know exactly what you are doing. Instead, you should use ZIO.uninterruptibleMask.

    Definition Classes
    ZIO
  109. final def intoPromise[E1 >: E, A1 >: A](p: => Promise[E1, A1])(implicit trace: Trace): URIO[Any, Boolean]

    Returns an effect that keeps or breaks a promise based on the result of this effect.

    Returns an effect that keeps or breaks a promise based on the result of this effect. Synchronizes interruption, so if this effect is interrupted, the specified promise will be interrupted, too.

    Definition Classes
    ZIO
  110. final def isFailure: Boolean

    Determines if the result is a failure.

  111. final def isFailure(implicit trace: Trace): URIO[Any, Boolean]

    Returns whether this effect is a failure.

    Returns whether this effect is a failure.

    Definition Classes
    ZIO
  112. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  113. final def isInterrupted: Boolean

    Determines if the result is interrupted.

  114. final def isInterruptedOnly: Boolean
  115. final def isSuccess: Boolean

    Determines if the result is a success.

  116. final def isSuccess(implicit trace: Trace): URIO[Any, Boolean]

    Returns whether this effect is a success.

    Returns whether this effect is a success.

    Definition Classes
    ZIO
  117. final def left[B, C](implicit ev: IsSubtypeOfOutput[A, Either[B, C]], trace: Trace): ZIO[Any, Either[E, C], B]

    "Zooms in" on the value in the Left side of an Either, moving the possibility that the value is a Right to the error channel.

    "Zooms in" on the value in the Left side of an Either, moving the possibility that the value is a Right to the error channel.

    Definition Classes
    ZIO
  118. final def leftWith[R1, E1, A1, B, B1, C, C1](f: (ZIO[Any, Either[E, C], B]) => ZIO[R1, Either[E1, C1], B1])(implicit ev: IsSubtypeOfOutput[A, Either[B, C]], trace: Trace): ZIO[R1, E1, Either[B1, C1]]

    Performs the specified operation while "zoomed in" on the Left case of an Either.

    Performs the specified operation while "zoomed in" on the Left case of an Either.

    Definition Classes
    ZIO
  119. final def logError(message: => String)(implicit trace: Trace): ZIO[Any, E, A]

    Logs the cause of failure of this workflow with the specified message.

    Logs the cause of failure of this workflow with the specified message.

    Definition Classes
    ZIO
  120. final def logError(implicit trace: Trace): ZIO[Any, E, A]

    Logs the cause of failure of this workflow.

    Logs the cause of failure of this workflow.

    Definition Classes
    ZIO
  121. def logSpan(label: => String)(implicit trace: Trace): ZIO[Any, E, A]

    Adjusts the label for the current logging span.

    Adjusts the label for the current logging span.

    parseRequest(req).logSpan("parsing")
    Definition Classes
    ZIO
  122. final def map[B](f: (A) => B)(implicit trace: Trace): ZIO[Any, E, B]

    Returns an effect whose success is mapped by the specified f function.

    Returns an effect whose success is mapped by the specified f function.

    Definition Classes
    ExitZIO
  123. final def mapAttempt[B](f: (A) => B)(implicit ev: IsSubtypeOfError[E, Throwable], trace: Trace): RIO[Any, B]

    Returns an effect whose success is mapped by the specified side effecting f function, translating any thrown exceptions into typed failed effects.

    Returns an effect whose success is mapped by the specified side effecting f function, translating any thrown exceptions into typed failed effects.

    Definition Classes
    ZIO
  124. final def mapBoth[E2, B](f: (E) => E2, g: (A) => B)(implicit ev: CanFail[E], trace: Trace): ZIO[Any, E2, B]

    Returns an effect whose failure and success channels have been mapped by the specified pair of functions, f and g.

    Returns an effect whose failure and success channels have been mapped by the specified pair of functions, f and g.

    Definition Classes
    ExitZIO
  125. final def mapBothExit[E1, A1](f: (E) => E1, g: (A) => A1): Exit[E1, A1]

    Maps over both the error and value type.

  126. final def mapError[E2](f: (E) => E2)(implicit ev: CanFail[E], trace: Trace): ZIO[Any, E2, A]

    Returns an effect with its error channel mapped using the specified function.

    Returns an effect with its error channel mapped using the specified function. This can be used to lift a "smaller" error into a "larger" error.

    Definition Classes
    ExitZIO
  127. final def mapErrorCause[E2](h: (Cause[E]) => Cause[E2])(implicit trace: Trace): ZIO[Any, E2, A]

    Returns an effect with its full cause of failure mapped using the specified function.

    Returns an effect with its full cause of failure mapped using the specified function. This can be used to transform errors while preserving the original structure of Cause.

    Definition Classes
    ExitZIO
    See also

    absorb, sandbox, catchAllCause - other functions for dealing with defects

  128. final def mapErrorCauseExit[E1](f: (Cause[E]) => Cause[E1]): Exit[E1, A]

    Maps over the cause type.

  129. final def mapErrorExit[E1](f: (E) => E1): Exit[E1, A]

    Maps over the error type.

  130. final def mapExit[A1](f: (A) => A1): Exit[E, A1]

    Maps over the value type.

  131. final def memoize(implicit trace: Trace): UIO[ZIO[Any, E, A]]

    Returns an effect that, if evaluated, will return the lazily computed result of this effect.

    Returns an effect that, if evaluated, will return the lazily computed result of this effect.

    Definition Classes
    ZIO
  132. final def merge[A1 >: A](implicit ev1: IsSubtypeOfError[E, A1], ev2: CanFail[E], trace: Trace): URIO[Any, A1]

    Returns a new effect where the error channel has been merged into the success channel to their common combined type.

    Returns a new effect where the error channel has been merged into the success channel to their common combined type.

    Definition Classes
    ZIO
  133. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  134. final def negate(implicit ev: IsSubtypeOfOutput[A, Boolean], trace: Trace): ZIO[Any, E, Boolean]

    Returns a new effect where boolean value of this effect is negated.

    Returns a new effect where boolean value of this effect is negated.

    Definition Classes
    ZIO
  135. final def none[B](implicit ev: IsSubtypeOfOutput[A, Option[B]], trace: Trace): ZIO[Any, Option[E], Unit]

    Requires the option produced by this value to be None.

    Requires the option produced by this value to be None.

    Definition Classes
    ZIO
  136. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  137. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  138. final def onDone[R1 <: Any](error: (E) => ZIO[R1, Nothing, Any], success: (A) => ZIO[R1, Nothing, Any])(implicit trace: Trace): ZIO[R1, Nothing, Unit]
    Definition Classes
    ZIO
  139. final def onDoneCause[R1 <: Any](error: (Cause[E]) => ZIO[R1, Nothing, Any], success: (A) => ZIO[R1, Nothing, Any])(implicit trace: Trace): ZIO[R1, Nothing, Unit]
    Definition Classes
    ZIO
  140. final def onError[R1 <: Any](cleanup: (Cause[E]) => URIO[R1, Any])(implicit trace: Trace): ZIO[R1, E, A]

    Runs the specified effect if this effect fails, providing the error to the effect if it exists.

    Runs the specified effect if this effect fails, providing the error to the effect if it exists. The provided effect will not be interrupted.

    Definition Classes
    ZIO
  141. final def onExecutionContext(ec: => ExecutionContext)(implicit trace: Trace): ZIO[Any, E, A]

    Executes the effect on the specified ExecutionContext and then shifts back to the default one.

    Executes the effect on the specified ExecutionContext and then shifts back to the default one.

    Definition Classes
    ZIO
  142. final def onExecutor(executor: => Executor)(implicit trace: Trace): ZIO[Any, E, A]

    Returns an effect which is guaranteed to be executed on the specified executor.

    Returns an effect which is guaranteed to be executed on the specified executor. The specified effect will always run on the specified executor, even in the presence of asynchronous boundaries.

    This is useful when an effect must be executed somewhere, for example: on a UI thread, inside a client library's thread pool, inside a blocking thread pool, inside a low-latency thread pool, or elsewhere.

    The onExecutor function composes with the innermost onExecutor taking priority. Use of this method does not alter the execution semantics of other effects composed with this one, making it easy to compositionally reason about where effects are running.

    Definition Classes
    ZIO
  143. final def onExit[R1 <: Any](cleanup: (Exit[E, A]) => URIO[R1, Any])(implicit trace: Trace): ZIO[R1, E, A]

    Ensures that a cleanup functions runs, whether this effect succeeds, fails, or is interrupted.

    Ensures that a cleanup functions runs, whether this effect succeeds, fails, or is interrupted.

    Definition Classes
    ZIO
  144. final def onInterrupt[R1 <: Any](cleanup: (Set[FiberId]) => URIO[R1, Any])(implicit trace: Trace): ZIO[R1, E, A]

    Calls the specified function, and runs the effect it returns, if this effect is interrupted.

    Calls the specified function, and runs the effect it returns, if this effect is interrupted.

    Definition Classes
    ZIO
  145. final def onInterrupt[R1 <: Any](cleanup: => URIO[R1, Any])(implicit trace: Trace): ZIO[R1, E, A]

    Runs the specified effect if this effect is interrupted.

    Runs the specified effect if this effect is interrupted.

    Definition Classes
    ZIO
  146. final def onTermination[R1 <: Any](cleanup: (Cause[Nothing]) => URIO[R1, Any])(implicit trace: Trace): ZIO[R1, E, A]

    Runs the specified effect if this effect is terminated, either because of a defect or because of interruption.

    Runs the specified effect if this effect is terminated, either because of a defect or because of interruption.

    Definition Classes
    ZIO
  147. final def once(implicit trace: Trace): UIO[ZIO[Any, E, Unit]]

    Returns an effect that will be executed at most once, even if it is evaluated multiple times.

    Returns an effect that will be executed at most once, even if it is evaluated multiple times.

    Definition Classes
    ZIO
  148. final def option(implicit ev: CanFail[E], trace: Trace): URIO[Any, Option[A]]

    Executes this effect, skipping the error but returning optionally the success.

    Executes this effect, skipping the error but returning optionally the success.

    Definition Classes
    ZIO
  149. final def orDie(implicit ev1: IsSubtypeOfError[E, Throwable], ev2: CanFail[E], trace: Trace): URIO[Any, A]

    Translates effect failure into death of the fiber, making all failures unchecked and not a part of the type of the effect.

    Translates effect failure into death of the fiber, making all failures unchecked and not a part of the type of the effect.

    Definition Classes
    ZIO
  150. final def orDieWith(f: (E) => Throwable)(implicit ev: CanFail[E], trace: Trace): URIO[Any, A]

    Keeps none of the errors, and terminates the fiber with them, using the specified function to convert the E into a Throwable.

    Keeps none of the errors, and terminates the fiber with them, using the specified function to convert the E into a Throwable.

    Definition Classes
    ZIO
  151. final def orElse[R1 <: Any, E2, A1 >: A](that: => ZIO[R1, E2, A1])(implicit ev: CanFail[E], trace: Trace): ZIO[R1, E2, A1]

    Executes this effect and returns its value, if it succeeds, but otherwise executes the specified effect.

    Executes this effect and returns its value, if it succeeds, but otherwise executes the specified effect.

    Definition Classes
    ZIO
  152. final def orElseEither[R1 <: Any, E2, B](that: => ZIO[R1, E2, B])(implicit ev: CanFail[E], trace: Trace): ZIO[R1, E2, Either[A, B]]

    Returns an effect that will produce the value of this effect, unless it fails, in which case, it will produce the value of the specified effect.

    Returns an effect that will produce the value of this effect, unless it fails, in which case, it will produce the value of the specified effect.

    Definition Classes
    ZIO
  153. final def orElseFail[E1](e1: => E1)(implicit ev: CanFail[E], trace: Trace): ZIO[Any, E1, A]

    Executes this effect and returns its value, if it succeeds, but otherwise fails with the specified error.

    Executes this effect and returns its value, if it succeeds, but otherwise fails with the specified error.

    Definition Classes
    ExitZIO
  154. final def orElseFailExit[E1](e1: => E1): Exit[E1, A]

    Replaces the error value with the one provided.

  155. final def orElseOptional[R1 <: Any, E1, A1 >: A](that: => ZIO[R1, Option[E1], A1])(implicit ev: IsSubtypeOfError[E, Option[E1]], trace: Trace): ZIO[R1, Option[E1], A1]

    Returns an effect that will produce the value of this effect, unless it fails with the None value, in which case it will produce the value of the specified effect.

    Returns an effect that will produce the value of this effect, unless it fails with the None value, in which case it will produce the value of the specified effect.

    Definition Classes
    ZIO
  156. final def orElseSucceed[A1 >: A](a1: => A1)(implicit ev: CanFail[E], trace: Trace): URIO[Any, A1]

    Executes this effect and returns its value, if it succeeds, but otherwise succeeds with the specified value.

    Executes this effect and returns its value, if it succeeds, but otherwise succeeds with the specified value.

    Definition Classes
    ZIO
  157. final def parallelErrors[E1 >: E](implicit trace: Trace): ZIO[Any, ::[E1], A]

    Exposes all parallel errors in a single call

    Exposes all parallel errors in a single call

    Definition Classes
    ZIO
  158. final def parallelFinalizers(implicit trace: Trace): ZIO[Any, E, A]

    Returns a new scoped workflow that runs finalizers added to the scope of this workflow in parallel.

    Returns a new scoped workflow that runs finalizers added to the scope of this workflow in parallel.

    Definition Classes
    ZIO
  159. def productElementName(n: Int): String
    Definition Classes
    Product
  160. def productElementNames: Iterator[String]
    Definition Classes
    Product
  161. def productIterator: Iterator[Any]
    Definition Classes
    Product
  162. def productPrefix: String
    Definition Classes
    Product
  163. macro def provide[E1 >: E](layer: ZLayer[_, E1, _]*): ZIO[Any, E1, A]

    Automatically assembles a layer for the ZIO effect.

    Automatically assembles a layer for the ZIO effect.

    Definition Classes
    ZIOVersionSpecific
  164. final def provideEnvironment(r: => ZEnvironment[Any])(implicit trace: Trace): IO[E, A]

    Provides the ZIO effect with its required environment, which eliminates its dependency on R.

    Provides the ZIO effect with its required environment, which eliminates its dependency on R.

    Definition Classes
    ZIO
  165. final def provideLayer[E1 >: E, R0](layer: => ZLayer[R0, E1, Any])(implicit trace: Trace): ZIO[R0, E1, A]

    Provides a layer to the ZIO effect, which translates it to another level.

    Provides a layer to the ZIO effect, which translates it to another level.

    Definition Classes
    ZIO
  166. def provideSome[R0]: ProvideSomeLayerPartiallyApplied[R0, Any, E, A]

    Splits the environment into two parts, assembling one part using the specified layer and leaving the remainder R0.

    Splits the environment into two parts, assembling one part using the specified layer and leaving the remainder R0.

    val clockLayer: ZLayer[Any, Nothing, Clock] = ???
    
    val zio: ZIO[Clock with Random, Nothing, Unit] = ???
    
    val zio2 = zio.provideSome[Random](clockLayer)
    Definition Classes
    ZIOVersionSpecific
  167. final def provideSomeEnvironment[R0](f: (ZEnvironment[R0]) => ZEnvironment[Any])(implicit trace: Trace): ZIO[R0, E, A]

    Transforms the environment being provided to this effect with the specified function.

    Transforms the environment being provided to this effect with the specified function.

    Definition Classes
    ZIO
  168. final def provideSomeLayer[R0]: ProvideSomeLayer[R0, Any, E, A]

    Splits the environment into two parts, providing one part using the specified layer and leaving the remainder R0.

    Splits the environment into two parts, providing one part using the specified layer and leaving the remainder R0.

    val zio: ZIO[Logging with Database, Nothing, Unit] = ???
    
    val loggingLayer: ZLayer[Any, Nothing, Logging] = ???
    
    val zio2 = zio.provideSomeLayer[Database](loggingLayer)
    Definition Classes
    ZIO
  169. final def race[R1 <: Any, E1 >: E, A1 >: A](that: => ZIO[R1, E1, A1])(implicit trace: Trace): ZIO[R1, E1, A1]

    Returns an effect that races this effect with the specified effect, returning the first successful A from the faster side.

    Returns an effect that races this effect with the specified effect, returning the first successful A from the faster side. If one effect succeeds, the other will be interrupted. If neither succeeds, then the effect will fail with some error.

    WARNING: The raced effect will safely interrupt the "loser", but will not resume until the loser has been cleanly terminated. If early return is desired, then instead of performing l race r, perform l.disconnect race r.disconnect, which disconnects left and right interrupt signal, allowing a fast return, with interruption performed in the background.

    Definition Classes
    ZIO
  170. final def raceAll[R1 <: Any, E1 >: E, A1 >: A](ios0: => Iterable[ZIO[R1, E1, A1]])(implicit trace: Trace): ZIO[R1, E1, A1]

    Returns an effect that races this effect with all the specified effects, yielding the value of the first effect to succeed with a value.

    Returns an effect that races this effect with all the specified effects, yielding the value of the first effect to succeed with a value. Losers of the race will be interrupted immediately

    Definition Classes
    ZIO
  171. final def raceEither[R1 <: Any, E1 >: E, B](that: => ZIO[R1, E1, B])(implicit trace: Trace): ZIO[R1, E1, Either[A, B]]

    Returns an effect that races this effect with the specified effect, yielding the first result to succeed.

    Returns an effect that races this effect with the specified effect, yielding the first result to succeed. If neither effect succeeds, then the composed effect will fail with some error.

    WARNING: The raced effect will safely interrupt the "loser", but will not resume until the loser has been cleanly terminated. If early return is desired, then instead of performing l raceEither r, perform l.disconnect raceEither r.disconnect, which disconnects left and right interrupt signal, allowing the earliest possible return.

    Definition Classes
    ZIO
  172. final def raceFirst[R1 <: Any, E1 >: E, A1 >: A](that: => ZIO[R1, E1, A1])(implicit trace: Trace): ZIO[R1, E1, A1]

    Returns an effect that races this effect with the specified effect, yielding the first result to complete, whether by success or failure.

    Returns an effect that races this effect with the specified effect, yielding the first result to complete, whether by success or failure. If neither effect completes, then the composed effect will not complete.

    WARNING: The raced effect will safely interrupt the "loser", but will not resume until the loser has been cleanly terminated. If early return is desired, then instead of performing l raceFirst r, perform l.disconnect raceFirst r.disconnect, which disconnects left and right interrupt signal, allowing a fast return, with interruption performed in the background.

    Definition Classes
    ZIO
  173. final def raceWith[R1 <: Any, E1, E2, B, C](that: => ZIO[R1, E1, B])(leftDone: (Exit[E, A], Fiber[E1, B]) => ZIO[R1, E2, C], rightDone: (Exit[E1, B], Fiber[E, A]) => ZIO[R1, E2, C])(implicit trace: Trace): ZIO[R1, E2, C]

    Returns an effect that races this effect with the specified effect, calling the specified finisher as soon as one result or the other has been computed.

    Returns an effect that races this effect with the specified effect, calling the specified finisher as soon as one result or the other has been computed.

    Definition Classes
    ZIO
  174. final def refineOrDie[E1](pf: PartialFunction[E, E1])(implicit ev1: IsSubtypeOfError[E, Throwable], ev2: CanFail[E], trace: Trace): ZIO[Any, E1, A]

    Keeps some of the errors, and terminates the fiber with the rest

    Keeps some of the errors, and terminates the fiber with the rest

    Definition Classes
    ZIO
  175. final def refineOrDieWith[E1](pf: PartialFunction[E, E1])(f: (E) => Throwable)(implicit ev: CanFail[E], trace: Trace): ZIO[Any, E1, A]

    Keeps some of the errors, and terminates the fiber with the rest, using the specified function to convert the E into a Throwable.

    Keeps some of the errors, and terminates the fiber with the rest, using the specified function to convert the E into a Throwable.

    Definition Classes
    ZIO
  176. final def reject[E1 >: E](pf: PartialFunction[A, E1])(implicit trace: Trace): ZIO[Any, E1, A]

    Fail with the returned value if the PartialFunction matches, otherwise continue with our held value.

    Fail with the returned value if the PartialFunction matches, otherwise continue with our held value.

    Definition Classes
    ZIO
  177. final def rejectZIO[R1 <: Any, E1 >: E](pf: PartialFunction[A, ZIO[R1, E1, E1]])(implicit trace: Trace): ZIO[R1, E1, A]

    Continue with the returned computation if the PartialFunction matches, translating the successful match into a failure, otherwise continue with our held value.

    Continue with the returned computation if the PartialFunction matches, translating the successful match into a failure, otherwise continue with our held value.

    Definition Classes
    ZIO
  178. final def repeat[R1 <: Any, B](schedule: => Schedule[R1, A, B])(implicit trace: Trace): ZIO[R1, E, B]

    Returns a new effect that repeats this effect according to the specified schedule or until the first failure.

    Returns a new effect that repeats this effect according to the specified schedule or until the first failure. Scheduled recurrences are in addition to the first execution, so that io.repeat(Schedule.once) yields an effect that executes io, and then if that succeeds, executes io an additional time.

    Definition Classes
    ZIO
  179. final def repeatN(n: => Int)(implicit trace: Trace): ZIO[Any, E, A]

    Returns a new effect that repeats this effect the specified number of times or until the first failure.

    Returns a new effect that repeats this effect the specified number of times or until the first failure. Repeats are in addition to the first execution, so that io.repeatN(1) yields an effect that executes io, and then if that succeeds, executes io an additional time.

    Definition Classes
    ZIO
  180. final def repeatOrElse[R1 <: Any, E2, B](schedule: => Schedule[R1, A, B], orElse: (E, Option[B]) => ZIO[R1, E2, B])(implicit trace: Trace): ZIO[R1, E2, B]

    Returns a new effect that repeats this effect according to the specified schedule or until the first failure, at which point, the failure value and schedule output are passed to the specified handler.

    Returns a new effect that repeats this effect according to the specified schedule or until the first failure, at which point, the failure value and schedule output are passed to the specified handler.

    Scheduled recurrences are in addition to the first execution, so that io.repeat(Schedule.once) yields an effect that executes io, and then if that succeeds, executes io an additional time.

    Definition Classes
    ZIO
  181. final def repeatOrElseEither[R1 <: Any, B, E2, C](schedule0: => Schedule[R1, A, B], orElse: (E, Option[B]) => ZIO[R1, E2, C])(implicit trace: Trace): ZIO[R1, E2, Either[C, B]]

    Returns a new effect that repeats this effect according to the specified schedule or until the first failure, at which point, the failure value and schedule output are passed to the specified handler.

    Returns a new effect that repeats this effect according to the specified schedule or until the first failure, at which point, the failure value and schedule output are passed to the specified handler.

    Scheduled recurrences are in addition to the first execution, so that io.repeat(Schedule.once) yields an effect that executes io, and then if that succeeds, executes io an additional time.

    Definition Classes
    ZIO
  182. final def repeatUntil(p: (A) => Boolean)(implicit trace: Trace): ZIO[Any, E, A]

    Repeats this effect until its value satisfies the specified predicate or until the first failure.

    Repeats this effect until its value satisfies the specified predicate or until the first failure.

    Definition Classes
    ZIO
  183. final def repeatUntilEquals[A1 >: A](a: => A1)(implicit trace: Trace): ZIO[Any, E, A1]

    Repeats this effect until its value is equal to the specified value or until the first failure.

    Repeats this effect until its value is equal to the specified value or until the first failure.

    Definition Classes
    ZIO
  184. final def repeatUntilZIO[R1 <: Any](f: (A) => URIO[R1, Boolean])(implicit trace: Trace): ZIO[R1, E, A]

    Repeats this effect until its value satisfies the specified effectful predicate or until the first failure.

    Repeats this effect until its value satisfies the specified effectful predicate or until the first failure.

    Definition Classes
    ZIO
  185. final def repeatWhile(p: (A) => Boolean)(implicit trace: Trace): ZIO[Any, E, A]

    Repeats this effect while its value satisfies the specified predicate or until the first failure.

    Repeats this effect while its value satisfies the specified predicate or until the first failure.

    Definition Classes
    ZIO
  186. final def repeatWhileEquals[A1 >: A](a: => A1)(implicit trace: Trace): ZIO[Any, E, A1]

    Repeats this effect for as long as its value is equal to the specified value or until the first failure.

    Repeats this effect for as long as its value is equal to the specified value or until the first failure.

    Definition Classes
    ZIO
  187. final def repeatWhileZIO[R1 <: Any](f: (A) => URIO[R1, Boolean])(implicit trace: Trace): ZIO[R1, E, A]

    Repeats this effect while its value satisfies the specified effectful predicate or until the first failure.

    Repeats this effect while its value satisfies the specified effectful predicate or until the first failure.

    Definition Classes
    ZIO
  188. final def replicateZIO(n: => Int)(implicit trace: Trace): ZIO[Any, E, Iterable[A]]

    Performs this effect the specified number of times and collects the results.

    Performs this effect the specified number of times and collects the results.

    Definition Classes
    ZIO
  189. final def replicateZIODiscard(n: => Int)(implicit trace: Trace): ZIO[Any, E, Unit]

    Performs this effect the specified number of times, discarding the results.

    Performs this effect the specified number of times, discarding the results.

    Definition Classes
    ZIO
  190. final def resurrect(implicit ev1: IsSubtypeOfError[E, Throwable], trace: Trace): RIO[Any, A]

    Unearth the unchecked failure of the effect.

    Unearth the unchecked failure of the effect. (opposite of orDie)

    val f0: Task[Unit] = ZIO.fail(new Exception("failing")).unit
    val f1: UIO[Unit]  = f0.orDie
    val f2: Task[Unit] = f1.resurrect
    Definition Classes
    ZIO
  191. final def retry[R1 <: Any, S](policy: => Schedule[R1, E, S])(implicit ev: CanFail[E], trace: Trace): ZIO[R1, E, A]

    Retries with the specified retry policy.

    Retries with the specified retry policy. Retries are done following the failure of the original io (up to a fixed maximum with once or recurs for example), so that that io.retry(Schedule.once) means "execute io and in case of failure, try again once".

    Definition Classes
    ZIO
  192. final def retryN(n: => Int)(implicit ev: CanFail[E], trace: Trace): ZIO[Any, E, A]

    Retries this effect the specified number of times.

    Retries this effect the specified number of times.

    Definition Classes
    ZIO
  193. final def retryOrElse[R1 <: Any, A1 >: A, S, E1](policy: => Schedule[R1, E, S], orElse: (E, S) => ZIO[R1, E1, A1])(implicit ev: CanFail[E], trace: Trace): ZIO[R1, E1, A1]

    Retries with the specified schedule, until it fails, and then both the value produced by the schedule together with the last error are passed to the recovery function.

    Retries with the specified schedule, until it fails, and then both the value produced by the schedule together with the last error are passed to the recovery function.

    Definition Classes
    ZIO
  194. final def retryOrElseEither[R1 <: Any, Out, E1, B](schedule0: => Schedule[R1, E, Out], orElse: (E, Out) => ZIO[R1, E1, B])(implicit ev: CanFail[E], trace: Trace): ZIO[R1, E1, Either[B, A]]

    Returns an effect that retries this effect with the specified schedule when it fails, until the schedule is done, then both the value produced by the schedule together with the last error are passed to the specified recovery function.

    Returns an effect that retries this effect with the specified schedule when it fails, until the schedule is done, then both the value produced by the schedule together with the last error are passed to the specified recovery function.

    Definition Classes
    ZIO
  195. final def retryUntil(f: (E) => Boolean)(implicit ev: CanFail[E], trace: Trace): ZIO[Any, E, A]

    Retries this effect until its error satisfies the specified predicate.

    Retries this effect until its error satisfies the specified predicate.

    Definition Classes
    ZIO
  196. final def retryUntilEquals[E1 >: E](e: => E1)(implicit ev: CanFail[E1], trace: Trace): ZIO[Any, E1, A]

    Retries this effect until its error is equal to the specified error.

    Retries this effect until its error is equal to the specified error.

    Definition Classes
    ZIO
  197. final def retryUntilZIO[R1 <: Any](f: (E) => URIO[R1, Boolean])(implicit ev: CanFail[E], trace: Trace): ZIO[R1, E, A]

    Retries this effect until its error satisfies the specified effectful predicate.

    Retries this effect until its error satisfies the specified effectful predicate.

    Definition Classes
    ZIO
  198. final def retryWhile(f: (E) => Boolean)(implicit ev: CanFail[E], trace: Trace): ZIO[Any, E, A]

    Retries this effect while its error satisfies the specified predicate.

    Retries this effect while its error satisfies the specified predicate.

    Definition Classes
    ZIO
  199. final def retryWhileEquals[E1 >: E](e: => E1)(implicit ev: CanFail[E1], trace: Trace): ZIO[Any, E1, A]

    Retries this effect for as long as its error is equal to the specified error.

    Retries this effect for as long as its error is equal to the specified error.

    Definition Classes
    ZIO
  200. final def retryWhileZIO[R1 <: Any](f: (E) => URIO[R1, Boolean])(implicit ev: CanFail[E], trace: Trace): ZIO[R1, E, A]

    Retries this effect while its error satisfies the specified effectful predicate.

    Retries this effect while its error satisfies the specified effectful predicate.

    Definition Classes
    ZIO
  201. final def right[B, C](implicit ev: IsSubtypeOfOutput[A, Either[B, C]], trace: Trace): ZIO[Any, Either[B, E], C]

    "Zooms in" on the value in the Right side of an Either, moving the possibility that the value is a Left to the error channel.

    "Zooms in" on the value in the Right side of an Either, moving the possibility that the value is a Left to the error channel.

    Definition Classes
    ZIO
  202. final def rightWith[R1, E1, A1, B, B1, C, C1](f: (ZIO[Any, Either[B, E], C]) => ZIO[R1, Either[B1, E1], C1])(implicit ev: IsSubtypeOfOutput[A, Either[B, C]], trace: Trace): ZIO[R1, E1, Either[B1, C1]]

    Performs the specified operation while "zoomed in" on the Right case of an Either.

    Performs the specified operation while "zoomed in" on the Right case of an Either.

    Definition Classes
    ZIO
  203. final def sandbox(implicit trace: Trace): ZIO[Any, Cause[E], A]

    Exposes the full cause of failure of this effect.

    Exposes the full cause of failure of this effect.

    final case class DomainError()
    
    val veryBadIO: IO[DomainError, Unit] =
      ZIO.succeed(5 / 0) *> ZIO.fail(DomainError())
    
    val caught: IO[DomainError, Unit] =
      veryBadIO.sandbox.mapError(_.untraced).catchAll {
        case Cause.Die(_: ArithmeticException) =>
          // Caught defect: divided by zero!
          ZIO.unit
        case Cause.Fail(_) =>
          // Caught error: DomainError!
          ZIO.unit
        case cause =>
          // Caught unknown defects, shouldn't recover!
          ZIO.refailCause(cause)
      }
    Definition Classes
    ZIO
  204. final def sandboxWith[R1 <: Any, E2, B](f: (ZIO[R1, Cause[E], A]) => ZIO[R1, Cause[E2], B])(implicit trace: Trace): ZIO[R1, E2, B]

    Companion helper to sandbox.

    Companion helper to sandbox. Allows recovery, and partial recovery, from errors and defects alike, as in:

    case class DomainError()
    
    val veryBadIO: IO[DomainError, Unit] =
      ZIO.succeed(5 / 0) *> ZIO.fail(DomainError())
    
    val caught: IO[DomainError, Unit] =
      veryBadIO.sandboxWith[Any, DomainError, Unit](_.catchSome {
        case Cause.Die(_: ArithmeticException, _)=>
          // Caught defect: divided by zero!
          ZIO.succeed(0)
      })

    Using sandboxWith with catchSome is better than using io.sandbox.catchAll with a partial match, because in the latter, if the match fails, the original defects will be lost and replaced by a MatchError

    Definition Classes
    ZIO
  205. final def schedule[R1 <: Any, B](schedule: => Schedule[R1, Any, B])(implicit trace: Trace): ZIO[R1, E, B]

    Runs this effect according to the specified schedule.

    Runs this effect according to the specified schedule.

    See scheduleFrom for a variant that allows the schedule's decision to depend on the result of this effect.

    Definition Classes
    ZIO
  206. final def scheduleFork[R1 <: Any, B](schedule: => Schedule[R1, Any, B])(implicit trace: Trace): ZIO[R1 with Scope, Nothing, Fiber.Runtime[E, B]]

    Runs this effect according to the specified schedule in a new fiber attached to the current scope.

    Runs this effect according to the specified schedule in a new fiber attached to the current scope.

    Definition Classes
    ZIO
  207. final def scheduleFrom[R1 <: Any, A1 >: A, B](a: => A1)(schedule0: => Schedule[R1, A1, B])(implicit trace: Trace): ZIO[R1, E, B]

    Runs this effect according to the specified schedule starting from the specified input value.

    Runs this effect according to the specified schedule starting from the specified input value.

    Definition Classes
    ZIO
  208. final def sequentialFinalizers(implicit trace: Trace): ZIO[Any, E, A]

    Returns a new scoped workflow that runs finalizers added to the scope of this workflow sequentially in the reverse of the order in which they were added.

    Returns a new scoped workflow that runs finalizers added to the scope of this workflow sequentially in the reverse of the order in which they were added. Note that finalizers are run sequentially by default so this only has meaning if used within a scope where finalizers are being run in parallel.

    Definition Classes
    ZIO
  209. final def some[B](implicit ev: IsSubtypeOfOutput[A, Option[B]], trace: Trace): ZIO[Any, Option[E], B]

    Converts an option on values into an option on errors.

    Converts an option on values into an option on errors.

    Definition Classes
    ZIO
  210. final def someOrElse[B, C](default: => C)(implicit ev0: IsSubtypeOfOutput[A, Option[B]], ev1: <:<[C, B], trace: Trace): ZIO[Any, E, B]

    Extracts the optional value, or returns the given 'default'.

    Extracts the optional value, or returns the given 'default'.

    Definition Classes
    ZIO
  211. final def someOrElse[B](default: => B)(implicit ev: IsSubtypeOfOutput[A, Option[B]], trace: Trace): ZIO[Any, E, B]

    Extracts the optional value, or returns the given 'default'.

    Extracts the optional value, or returns the given 'default'. Superseded by someOrElse with better type inference. This method was left for binary compatibility.

    Attributes
    protected
    Definition Classes
    ZIO
  212. final def someOrElseZIO[B, R1 <: Any, E1 >: E, C](default: => ZIO[R1, E1, C])(implicit ev0: IsSubtypeOfOutput[A, Option[B]], ev1: <:<[C, B], trace: Trace): ZIO[R1, E1, B]

    Extracts the optional value, or executes the effect 'default'.

    Extracts the optional value, or executes the effect 'default'.

    Definition Classes
    ZIO
  213. final def someOrElseZIO[B, R1 <: Any, E1 >: E](default: => ZIO[R1, E1, B])(implicit ev: IsSubtypeOfOutput[A, Option[B]], trace: Trace): ZIO[R1, E1, B]

    Extracts the optional value, or executes the effect 'default'.

    Extracts the optional value, or executes the effect 'default'. Superseded by someOrElseZIO with better type inference. This method was left for binary compatibility.

    Attributes
    protected
    Definition Classes
    ZIO
  214. final def someOrFail[B, E1 >: E](e: => E1)(implicit ev: IsSubtypeOfOutput[A, Option[B]], trace: Trace): ZIO[Any, E1, B]

    Extracts the optional value, or fails with the given error 'e'.

    Extracts the optional value, or fails with the given error 'e'.

    Definition Classes
    ZIO
  215. final def someOrFailException[B, E1 >: E](implicit ev: IsSubtypeOfOutput[A, Option[B]], ev2: <:<[NoSuchElementException, E1], trace: Trace): ZIO[Any, E1, B]

    Extracts the optional value, or fails with a java.util.NoSuchElementException

    Extracts the optional value, or fails with a java.util.NoSuchElementException

    Definition Classes
    ZIO
  216. final def someWith[R1, E1, A1, B, B1](f: (ZIO[Any, Option[E], B]) => ZIO[R1, Option[E1], B1])(implicit ev: IsSubtypeOfOutput[A, Option[B]], trace: Trace): ZIO[R1, E1, Option[B1]]

    Perfoms the specified operation while "zoomed in" on the Some case of an Option.

    Perfoms the specified operation while "zoomed in" on the Some case of an Option.

    Definition Classes
    ZIO
  217. final def summarized[R1 <: Any, E1 >: E, B, C](summary0: => ZIO[R1, E1, B])(f: (B, B) => C)(implicit trace: Trace): ZIO[R1, E1, (C, A)]

    Summarizes a effect by computing some value before and after execution, and then combining the values to produce a summary, together with the result of execution.

    Summarizes a effect by computing some value before and after execution, and then combining the values to produce a summary, together with the result of execution.

    Definition Classes
    ZIO
  218. final def supervised(supervisor: => Supervisor[Any])(implicit trace: Trace): ZIO[Any, E, A]

    Returns an effect with the behavior of this one, but where all child fibers forked in the effect are reported to the specified supervisor.

    Returns an effect with the behavior of this one, but where all child fibers forked in the effect are reported to the specified supervisor.

    Definition Classes
    ZIO
  219. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  220. final def tap[R1 <: Any, E1 >: E](f: (A) => ZIO[R1, E1, Any])(implicit trace: Trace): ZIO[R1, E1, A]

    Returns an effect that effectfully "peeks" at the success of this effect.

    Returns an effect that effectfully "peeks" at the success of this effect.

    readFile("data.json").tap(printLine)
    Definition Classes
    ZIO
  221. final def tapBoth[R1 <: Any, E1 >: E](f: (E) => ZIO[R1, E1, Any], g: (A) => ZIO[R1, E1, Any])(implicit ev: CanFail[E], trace: Trace): ZIO[R1, E1, A]

    Returns an effect that effectfully "peeks" at the failure or success of this effect.

    Returns an effect that effectfully "peeks" at the failure or success of this effect.

    readFile("data.json").tapBoth(logError(_), logData(_))
    Definition Classes
    ZIO
  222. final def tapDefect[R1 <: Any, E1 >: E](f: (Cause[Nothing]) => ZIO[R1, E1, Any])(implicit trace: Trace): ZIO[R1, E1, A]

    Returns an effect that effectually "peeks" at the defect of this effect.

    Returns an effect that effectually "peeks" at the defect of this effect.

    Definition Classes
    ZIO
  223. final def tapEither[R1 <: Any, E1 >: E](f: (Either[E, A]) => ZIO[R1, E1, Any])(implicit ev: CanFail[E], trace: Trace): ZIO[R1, E1, A]

    Returns an effect that effectfully "peeks" at the result of this effect.

    Returns an effect that effectfully "peeks" at the result of this effect.

    readFile("data.json").tapEither(result => log(result.fold("Error: " + _, "Success: " + _)))
    Definition Classes
    ZIO
  224. final def tapError[R1 <: Any, E1 >: E](f: (E) => ZIO[R1, E1, Any])(implicit ev: CanFail[E], trace: Trace): ZIO[R1, E1, A]

    Returns an effect that effectfully "peeks" at the failure of this effect.

    Returns an effect that effectfully "peeks" at the failure of this effect.

    readFile("data.json").tapError(logError(_))
    Definition Classes
    ZIO
  225. final def tapErrorCause[R1 <: Any, E1 >: E](f: (Cause[E]) => ZIO[R1, E1, Any])(implicit trace: Trace): ZIO[R1, E1, A]

    Returns an effect that effectually "peeks" at the cause of the failure of this effect.

    Returns an effect that effectually "peeks" at the cause of the failure of this effect.

    readFile("data.json").tapErrorCause(logCause(_))
    Definition Classes
    ZIO
  226. final def tapErrorTrace[R1 <: Any, E1 >: E](f: ((E, StackTrace)) => ZIO[R1, E1, Any])(implicit ev: CanFail[E], trace: Trace): ZIO[R1, E1, A]

    A version of tapError that gives you the trace of the error.

    A version of tapError that gives you the trace of the error.

    Definition Classes
    ZIO
  227. final def tapSome[R1 <: Any, E1 >: E](f: PartialFunction[A, ZIO[R1, E1, Any]])(implicit trace: Trace): ZIO[R1, E1, A]

    Returns an effect that effectfully "peeks" at the success of this effect.

    Returns an effect that effectfully "peeks" at the success of this effect. If the partial function isn't defined at the input, the result is equivalent to the original effect.

    readFile("data.json").tapSome {
      case content if content.nonEmpty => putStrLn(content)
    }
    Definition Classes
    ZIO
  228. final def tapSomeError[R1 <: Any, E1 >: E](f: PartialFunction[E, ZIO[R1, E1, Any]])(implicit ev: CanFail[E], trace: Trace): ZIO[R1, E1, A]

    Returns an effect that effectfully "peeks" at the failure of this effect.

    Returns an effect that effectfully "peeks" at the failure of this effect. If the partial function isn't defined at the input, the result is equivalent to the original effect.

    Definition Classes
    ZIO
  229. final def timed(implicit trace: Trace): ZIO[Any, E, (zio.Duration, A)]

    Returns a new effect that executes this one and times the execution.

    Returns a new effect that executes this one and times the execution.

    Definition Classes
    ZIO
  230. final def timedWith[R1 <: Any, E1 >: E](nanoTime: => ZIO[R1, E1, Long])(implicit trace: Trace): ZIO[R1, E1, (zio.Duration, A)]

    A more powerful variation of timed that allows specifying the workflow that will be used to calculate the current time.

    A more powerful variation of timed that allows specifying the workflow that will be used to calculate the current time.

    Definition Classes
    ZIO
  231. final def timeout(d: => zio.Duration)(implicit trace: Trace): ZIO[Any, E, Option[A]]

    Returns an effect that will timeout this effect, returning None if the timeout elapses before the effect has produced a value; and returning Some of the produced value otherwise.

    Returns an effect that will timeout this effect, returning None if the timeout elapses before the effect has produced a value; and returning Some of the produced value otherwise.

    If the timeout elapses without producing a value, the running effect will be safely interrupted.

    WARNING: The effect returned by this method will not itself return until the underlying effect is actually interrupted. This leads to more predictable resource utilization. If early return is desired, then instead of using effect.timeout(d), use effect.disconnect.timeout(d), which first disconnects the effect's interruption signal before performing the timeout, resulting in earliest possible return, before an underlying effect has been successfully interrupted.

    Definition Classes
    ZIO
  232. final def timeoutFail[E1 >: E](e: => E1)(d: => zio.Duration)(implicit trace: Trace): ZIO[Any, E1, A]

    The same as timeout, but instead of producing a None in the event of timeout, it will produce the specified error.

    The same as timeout, but instead of producing a None in the event of timeout, it will produce the specified error.

    Definition Classes
    ZIO
  233. final def timeoutFailCause[E1 >: E](cause: => Cause[E1])(d: => zio.Duration)(implicit trace: Trace): ZIO[Any, E1, A]

    The same as timeout, but instead of producing a None in the event of timeout, it will produce the specified failure.

    The same as timeout, but instead of producing a None in the event of timeout, it will produce the specified failure.

    Definition Classes
    ZIO
  234. final def timeoutTo[B](b: => B): TimeoutTo[Any, E, A, B]

    Returns an effect that will timeout this effect, returning either the default value if the timeout elapses before the effect has produced a value; and or returning the result of applying the function f to the success value of the effect.

    Returns an effect that will timeout this effect, returning either the default value if the timeout elapses before the effect has produced a value; and or returning the result of applying the function f to the success value of the effect.

    If the timeout elapses without producing a value, the running effect will be safely interrupted

    ZIO.succeed(1).timeoutTo(None)(Some(_))(1.second)
    Definition Classes
    ZIO
  235. def toCompletableFuture[A1 >: A](implicit ev: IsSubtypeOfError[E, Throwable], trace: Trace): URIO[Any, CompletableFuture[A1]]
    Definition Classes
    ZIOPlatformSpecific
  236. def toCompletableFutureWith[A1 >: A](f: (E) => Throwable)(implicit trace: Trace): URIO[Any, CompletableFuture[A1]]
    Definition Classes
    ZIOPlatformSpecific
  237. final def toEither: Either[Throwable, A]

    Converts the Exit to an Either[Throwable, A], by wrapping the cause in FiberFailure (if the result is failed).

  238. final def toFuture(implicit ev2: IsSubtypeOfError[E, Throwable], trace: Trace): URIO[Any, CancelableFuture[A]]

    Converts the effect into a scala.concurrent.Future.

    Converts the effect into a scala.concurrent.Future.

    Definition Classes
    ZIO
  239. final def toFutureWith(f: (E) => Throwable)(implicit trace: Trace): URIO[Any, CancelableFuture[A]]

    Converts the effect into a scala.concurrent.Future.

    Converts the effect into a scala.concurrent.Future.

    Definition Classes
    ZIO
  240. def toString(): String
    Definition Classes
    AnyRef → Any
  241. final def toTry(implicit ev: <:<[E, Throwable]): Try[A]
  242. final def trace: Trace
    Definition Classes
    ExitZIO
  243. final def uncause[E1 >: E](implicit ev: IsSubtypeOfOutput[A, Cause[E1]], trace: Trace): ZIO[Any, E1, Unit]

    When this effect succeeds with a cause, then this method returns a new effect that either fails with the cause that this effect succeeded with, or succeeds with unit, depending on whether the cause is empty.

    When this effect succeeds with a cause, then this method returns a new effect that either fails with the cause that this effect succeeded with, or succeeds with unit, depending on whether the cause is empty.

    This operation is the opposite of cause.

    Definition Classes
    ZIO
  244. final def unexit[E1 >: E, A2](implicit ev: <:<[A, Exit[E1, A2]], trace: Trace): ZIO[Any, E1, A2]
    Definition Classes
    ZIO
  245. final def uninterruptible(implicit trace: Trace): ZIO[Any, E, A]

    Performs this effect uninterruptibly.

    Performs this effect uninterruptibly. This will prevent the effect from being terminated externally, but the effect may fail for internal reasons (e.g. an uncaught error) or terminate due to defect.

    Uninterruptible effects may recover from all failure causes (including interruption of an inner effect that has been made interruptible).

    Definition Classes
    ZIO
  246. final def unit(implicit trace: Trace): ZIO[Any, E, Unit]

    Returns the effect resulting from mapping the success of this effect to unit.

    Returns the effect resulting from mapping the success of this effect to unit.

    Definition Classes
    ExitZIO
  247. final def unitExit: Exit[E, Unit]

    Discards the value.

  248. final def unleft[E1, B](implicit ev: IsSubtypeOfError[E, Either[E1, B]], trace: Trace): ZIO[Any, E1, Either[A, B]]

    Converts a ZIO[R, Either[E, B], A] into a ZIO[R, E, Either[A, B]].

    Converts a ZIO[R, Either[E, B], A] into a ZIO[R, E, Either[A, B]]. The inverse of left.

    Definition Classes
    ZIO
  249. final def unless(p: => Boolean)(implicit trace: Trace): ZIO[Any, E, Option[A]]

    The moral equivalent of if (!p) Some(exp) else None

    The moral equivalent of if (!p) Some(exp) else None

    Definition Classes
    ZIO
  250. final def unlessDiscard(p: => Boolean)(implicit trace: Trace): ZIO[Any, E, Unit]

    The moral equivalent of if (!p) { expr; () }

    The moral equivalent of if (!p) { expr; () }

    Definition Classes
    ZIO
  251. final def unlessZIO[R1 <: Any, E1 >: E](p: => ZIO[R1, E1, Boolean])(implicit trace: Trace): ZIO[R1, E1, Option[A]]

    The moral equivalent of if (!p) Some(exp) else None when p has side-effects

    The moral equivalent of if (!p) Some(exp) else None when p has side-effects

    Definition Classes
    ZIO
  252. final def unlessZIODiscard[R1 <: Any, E1 >: E](p: => ZIO[R1, E1, Boolean])(implicit trace: Trace): ZIO[R1, E1, Unit]

    The moral equivalent of if (!p) { expr; () } when p has side-effects

    The moral equivalent of if (!p) { expr; () } when p has side-effects

    Definition Classes
    ZIO
  253. final def unrefine[E1 >: E](pf: PartialFunction[Throwable, E1])(implicit trace: Trace): ZIO[Any, E1, A]

    Takes some fiber failures and converts them into errors.

    Takes some fiber failures and converts them into errors.

    Definition Classes
    ZIO
  254. final def unrefineTo[E1 >: E](implicit arg0: ClassTag[E1], trace: Trace): ZIO[Any, E1, A]

    Takes some fiber failures and converts them into errors.

    Takes some fiber failures and converts them into errors.

    Definition Classes
    ZIO
  255. final def unrefineWith[E1](pf: PartialFunction[Throwable, E1])(f: (E) => E1)(implicit trace: Trace): ZIO[Any, E1, A]

    Takes some fiber failures and converts them into errors, using the specified function to convert the E into an E1.

    Takes some fiber failures and converts them into errors, using the specified function to convert the E into an E1.

    Definition Classes
    ZIO
  256. final def unright[E1, B](implicit ev: IsSubtypeOfError[E, Either[B, E1]], trace: Trace): ZIO[Any, E1, Either[B, A]]

    Converts a ZIO[R, Either[B, E], A] into a ZIO[R, E, Either[B, A]].

    Converts a ZIO[R, Either[B, E], A] into a ZIO[R, E, Either[B, A]]. The inverse of right.

    Definition Classes
    ZIO
  257. final def unsandbox[E1](implicit ev: IsSubtypeOfError[E, Cause[E1]], trace: Trace): ZIO[Any, E1, A]

    The inverse operation to sandbox.

    The inverse operation to sandbox. Submerges the full cause of failure.

    Definition Classes
    ZIO
  258. final def unsome[E1](implicit ev: IsSubtypeOfError[E, Option[E1]], trace: Trace): ZIO[Any, E1, Option[A]]

    Converts an option on errors into an option on values.

    Converts an option on errors into an option on values.

    Definition Classes
    ZIO
  259. final def untraced: Exit[E, A]

    Returns an untraced exit value.

  260. final def updateService[M]: UpdateService[Any, E, A, M]

    Updates a service in the environment of this effect.

    Updates a service in the environment of this effect.

    Definition Classes
    ZIO
  261. final def updateServiceAt[Service]: UpdateServiceAt[Any, E, A, Service]

    Updates a service at the specified key in the environment of this effect.

    Updates a service at the specified key in the environment of this effect.

    Definition Classes
    ZIO
  262. final def validate[R1 <: Any, E1 >: E, B](that: => ZIO[R1, E1, B])(implicit zippable: Zippable[A, B], trace: Trace): ZIO[R1, E1, Out]

    Sequentially zips the this result with the specified result.

    Sequentially zips the this result with the specified result. Combines both Cause[E1] when both effects fail.

    Definition Classes
    ZIO
  263. final def validatePar[R1 <: Any, E1 >: E, B](that: => ZIO[R1, E1, B])(implicit trace: Trace): ZIO[R1, E1, (A, B)]

    Returns an effect that executes both this effect and the specified effect, in parallel.

    Returns an effect that executes both this effect and the specified effect, in parallel. Combines both Cause[E1] when both effects fail.

    Definition Classes
    ZIO
  264. final def validateWith[R1 <: Any, E1 >: E, B, C](that: => ZIO[R1, E1, B])(f: (A, B) => C)(implicit trace: Trace): ZIO[R1, E1, C]

    Sequentially zips this effect with the specified effect using the specified combiner function.

    Sequentially zips this effect with the specified effect using the specified combiner function. Combines the causes in case both effect fail.

    Definition Classes
    ZIO
  265. final def validateWithPar[R1 <: Any, E1 >: E, B, C](that: => ZIO[R1, E1, B])(f: (A, B) => C)(implicit trace: Trace): ZIO[R1, E1, C]

    Returns an effect that executes both this effect and the specified effect, in parallel, combining their results with the specified f function.

    Returns an effect that executes both this effect and the specified effect, in parallel, combining their results with the specified f function. If both sides fail, then the cause will be combined.

    Definition Classes
    ZIO
  266. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  267. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  268. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  269. final def when(p: => Boolean)(implicit trace: Trace): ZIO[Any, E, Option[A]]

    The moral equivalent of if (p) Some(exp) else None

    The moral equivalent of if (p) Some(exp) else None

    Definition Classes
    ZIO
  270. final def whenDiscard(p: => Boolean)(implicit trace: Trace): ZIO[Any, E, Unit]

    The moral equivalent of if (p) { expr; () }

    The moral equivalent of if (p) { expr; () }

    Definition Classes
    ZIO
  271. final def whenFiberRef[S](ref: => FiberRef[S])(f: (S) => Boolean)(implicit trace: Trace): ZIO[Any, E, (S, Option[A])]

    Executes this workflow when value of the specified FiberRef satisfies the predicate.

    Executes this workflow when value of the specified FiberRef satisfies the predicate.

    Definition Classes
    ZIO
  272. final def whenRef[S](ref: => Ref[S])(f: (S) => Boolean)(implicit trace: Trace): ZIO[Any, E, (S, Option[A])]

    Executes this workflow when the value of the Ref satisfies the predicate.

    Executes this workflow when the value of the Ref satisfies the predicate.

    Definition Classes
    ZIO
  273. final def whenZIO[R1 <: Any, E1 >: E](p: => ZIO[R1, E1, Boolean])(implicit trace: Trace): ZIO[R1, E1, Option[A]]

    The moral equivalent of if (p) Some(exp) else None when p has side-effects

    The moral equivalent of if (p) Some(exp) else None when p has side-effects

    Definition Classes
    ZIO
  274. final def whenZIODiscard[R1 <: Any, E1 >: E](p: => ZIO[R1, E1, Boolean])(implicit trace: Trace): ZIO[R1, E1, Unit]

    The moral equivalent of if (p) { expr; () } when p has side-effects

    The moral equivalent of if (p) { expr; () } when p has side-effects

    Definition Classes
    ZIO
  275. final def withClock[B <: Clock](clock: => B)(implicit tag: Tag[B], trace: Trace): ZIO[Any, E, A]

    Executes this workflow with the specified implementation of the clock service.

    Executes this workflow with the specified implementation of the clock service.

    Definition Classes
    ZIO
  276. final def withConfigProvider[B <: ConfigProvider](configProvider: => B)(implicit tag: Tag[B], trace: Trace): ZIO[Any, E, A]

    Executes this workflow with the specified configuration provider.

    Executes this workflow with the specified configuration provider.

    Definition Classes
    ZIO
  277. final def withConsole[B <: Console](console: => B)(implicit tag: Tag[B], trace: Trace): ZIO[Any, E, A]

    Executes this workflow with the specified implementation of the console service.

    Executes this workflow with the specified implementation of the console service.

    Definition Classes
    ZIO
  278. final def withEarlyRelease(implicit trace: Trace): ZIO[Scope, E, (UIO[Unit], A)]

    Returns a new scoped workflow that returns the result of this workflow as well as a finalizer that can be run to close the scope of this workflow.

    Returns a new scoped workflow that returns the result of this workflow as well as a finalizer that can be run to close the scope of this workflow.

    Definition Classes
    ZIO
  279. final def withFinalizer[R1 <: Any](finalizer: (A) => URIO[R1, Any])(implicit trace: Trace): ZIO[R1 with Scope, E, A]

    Treats this effect as the acquisition of a resource and adds the specified finalizer to the current scope.

    Treats this effect as the acquisition of a resource and adds the specified finalizer to the current scope. This effect will be run uninterruptibly and the finalizer will be run when the scope is closed.

    Definition Classes
    ZIO
  280. final def withFinalizerExit[R1 <: Any](finalizer: (A, Exit[Any, Any]) => URIO[R1, Any])(implicit trace: Trace): ZIO[R1 with Scope, E, A]

    A more powerful variant of withFinalizer that allows the finalizer to depend on the Exit value that the scope is closed with.

    A more powerful variant of withFinalizer that allows the finalizer to depend on the Exit value that the scope is closed with.

    Definition Classes
    ZIO
  281. final def withLogger[B <: ZLogger[String, Any]](logger: => B)(implicit tag: Tag[B], trace: Trace): ZIO[Any, E, A]

    Executes this workflow with the specified logger added.

    Executes this workflow with the specified logger added.

    Definition Classes
    ZIO
  282. final def withParallelism(n: => Int)(implicit trace: Trace): ZIO[Any, E, A]

    Runs this effect with the specified maximum number of fibers for parallel operators.

    Runs this effect with the specified maximum number of fibers for parallel operators.

    Definition Classes
    ZIO
  283. def withParallelismUnbounded(implicit trace: Trace): ZIO[Any, E, A]

    Runs this effect with an unbounded maximum number of fibers for parallel operators.

    Runs this effect with an unbounded maximum number of fibers for parallel operators.

    Definition Classes
    ZIO
  284. final def withRandom[B <: Random](random: => B)(implicit tag: Tag[B], trace: Trace): ZIO[Any, E, A]

    Executes this workflow with the specified implementation of the random service.

    Executes this workflow with the specified implementation of the random service.

    Definition Classes
    ZIO
  285. final def withRuntimeFlags(patch: Patch)(implicit trace: Trace): ZIO[Any, E, A]

    Returns a new ZIO effect that will update the runtime flags according to the specified patch within the scope of this ZIO effect.

    Returns a new ZIO effect that will update the runtime flags according to the specified patch within the scope of this ZIO effect.

    Definition Classes
    ZIO
  286. final def withSystem[B <: System](system: => B)(implicit tag: Tag[B], trace: Trace): ZIO[Any, E, A]

    Executes this workflow with the specified implementation of the system service.

    Executes this workflow with the specified implementation of the system service.

    Definition Classes
    ZIO
  287. final def zip[E1 >: E, B](that: Exit[E1, B])(implicit zippable: Zippable[A, B]): Exit[E1, Out]

    Named alias for <*>.

  288. final def zip[R1 <: Any, E1 >: E, B](that: => ZIO[R1, E1, B])(implicit zippable: Zippable[A, B], trace: Trace): ZIO[R1, E1, Out]

    A named alias for <*>.

    A named alias for <*>.

    Definition Classes
    ZIO
  289. final def zipLeft[E1 >: E, B](that: Exit[E1, B]): Exit[E1, A]

    Named alias for <*.

  290. final def zipLeft[R1 <: Any, E1 >: E, B](that: => ZIO[R1, E1, B])(implicit trace: Trace): ZIO[R1, E1, A]

    A named alias for <*.

    A named alias for <*.

    Definition Classes
    ZIO
  291. final def zipPar[E1 >: E, B](that: Exit[E1, B])(implicit zippable: Zippable[A, B]): Exit[E1, Out]

    Named alias for <&>.

  292. final def zipPar[R1 <: Any, E1 >: E, B](that: => ZIO[R1, E1, B])(implicit zippable: Zippable[A, B], trace: Trace): ZIO[R1, E1, Out]

    A named alias for <&>.

    A named alias for <&>.

    Definition Classes
    ZIO
  293. final def zipParLeft[E1 >: E, B](that: Exit[E1, B]): Exit[E1, A]

    Named alias for <&.

  294. final def zipParLeft[R1 <: Any, E1 >: E, B](that: => ZIO[R1, E1, B])(implicit trace: Trace): ZIO[R1, E1, A]

    A named alias for <&.

    A named alias for <&.

    Definition Classes
    ZIO
  295. final def zipParRight[E1 >: E, B](that: Exit[E1, B]): Exit[E1, B]

    Named alias for &>.

  296. final def zipParRight[R1 <: Any, E1 >: E, B](that: => ZIO[R1, E1, B])(implicit trace: Trace): ZIO[R1, E1, B]

    A named alias for &>.

    A named alias for &>.

    Definition Classes
    ZIO
  297. final def zipRight[E1 >: E, B](that: Exit[E1, B]): Exit[E1, B]

    Named alias for *>.

  298. final def zipRight[R1 <: Any, E1 >: E, B](that: => ZIO[R1, E1, B])(implicit trace: Trace): ZIO[R1, E1, B]

    A named alias for *>.

    A named alias for *>.

    Definition Classes
    ZIO
  299. final def zipWith[E1 >: E, B, C](that: Exit[E1, B])(f: (A, B) => C, g: (Cause[E], Cause[E1]) => Cause[E1]): Exit[E1, C]

    Zips this together with the specified result using the combination functions.

  300. final def zipWith[R1 <: Any, E1 >: E, B, C](that: => ZIO[R1, E1, B])(f: (A, B) => C)(implicit trace: Trace): ZIO[R1, E1, C]

    Sequentially zips this effect with the specified effect using the specified combiner function.

    Sequentially zips this effect with the specified effect using the specified combiner function.

    Definition Classes
    ZIO
  301. final def zipWithPar[R1 <: Any, E1 >: E, B, C](that: => ZIO[R1, E1, B])(f: (A, B) => C)(implicit trace: Trace): ZIO[R1, E1, C]

    Returns an effect that executes both this effect and the specified effect, in parallel, combining their results with the specified f function.

    Returns an effect that executes both this effect and the specified effect, in parallel, combining their results with the specified f function. If either side fails, then the other side will be interrupted.

    Definition Classes
    ZIO

Deprecated Value Members

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

    (Since version 9)

  2. final def raceAwait[R1 <: Any, E1 >: E, A1 >: A](that: => ZIO[R1, E1, A1])(implicit trace: Trace): ZIO[R1, E1, A1]
    Definition Classes
    ZIO
    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.7) use race

  3. final def raceFirstAwait[R1 <: Any, E1 >: E, A1 >: A](that: => ZIO[R1, E1, A1])(implicit trace: Trace): ZIO[R1, E1, A1]
    Definition Classes
    ZIO
    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.7) use raceFirst

  4. final def unary_![R1 <: Any, E1 >: E](implicit ev: <:<[A, Boolean], trace: Trace): ZIO[R1, E1, Boolean]

    Returns the logical negation of the Boolean value returned by this effect.

    Returns the logical negation of the Boolean value returned by this effect.

    Definition Classes
    ZIO
    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.6) use negate

Inherited from ZIO[Any, E, A]

Inherited from ZIOVersionSpecific[Any, E, A]

Inherited from ZIOPlatformSpecific[Any, E, A]

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped