Object/Trait

zio

ZIO

Related Docs: trait ZIO | package zio

Permalink

object ZIO extends ZIOFunctions

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ZIO
  2. ZIOFunctions
  3. Serializable
  4. Serializable
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. final class AccessMPartiallyApplied[R] extends AnyVal

    Permalink
  2. final class AccessPartiallyApplied[R] extends AnyVal

    Permalink
  3. final class BracketAcquire[-R, +E, +A] extends AnyVal

    Permalink
  4. final class BracketAcquire_[-R, +E] extends AnyVal

    Permalink
  5. final class BracketExitAcquire[-R, +E, +A] extends AnyVal

    Permalink
  6. class BracketExitRelease[-R, +E, E1, +A, B] extends AnyRef

    Permalink
  7. class BracketRelease[-R, +E, +A] extends AnyRef

    Permalink
  8. final class BracketReleaseFn[R, E, A, B] extends ZIOFn2[A, Exit[E, B], ZIO[R, Nothing, _]]

    Permalink
  9. final class BracketRelease_[-R, +E] extends AnyRef

    Permalink
  10. final class ConstFn[R, E, A, B] extends ZIOFn1[A, ZIO[R, E, B]]

    Permalink
  11. final class FoldCauseMFailureFn[R, E, E2, A] extends ZIOFn1[Cause[E], ZIO[R, E2, A]]

    Permalink
  12. final class InterruptStatusRestore extends AnyVal

    Permalink
  13. final class MapErrorCauseFn[R, E, E2, A] extends ZIOFn1[Cause[E], ZIO[R, E2, Nothing]]

    Permalink
  14. final class MapErrorFn[R, E, E2, A] extends ZIOFn1[Cause[E], ZIO[R, E2, Nothing]]

    Permalink
  15. final class MapFn[R, E, A, B] extends ZIOFn1[A, ZIO[R, E, B]]

    Permalink
  16. final class SucceedFn[R, E, A] extends ZIOFn1[A, ZIO[R, E, A]]

    Permalink
  17. final class TapErrorRefailFn[R, E, E1 >: E, A] extends ZIOFn1[Cause[E], ZIO[R, E1, Nothing]]

    Permalink
  18. final class TapFn[R, E, A] extends ZIOFn1[A, ZIO[R, E, A]]

    Permalink
  19. final class TimeoutTo[R, E, A, B] extends AnyRef

    Permalink
  20. implicit final class ZIOAutocloseableOps[R, E, A <: AutoCloseable] extends AnyVal

    Permalink
  21. final class ZipLeftFn[R, E, A, B] extends ZIOFn1[B, ZIO[R, E, B]]

    Permalink
  22. final class ZipRightFn[R, E, A, B] extends ZIOFn1[A, ZIO[R, E, B]]

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def _1[R, E, A, B](implicit ev: <:<[R, (A, B)]): ZIO[R, E, A]

    Permalink

    Returns an effectful function that extracts out the first element of a tuple.

    Returns an effectful function that extracts out the first element of a tuple.

    Definition Classes
    ZIOFunctions
  5. final def _2[R, E, A, B](implicit ev: <:<[R, (A, B)]): ZIO[R, E, B]

    Permalink

    Returns an effectful function that extracts out the second element of a tuple.

    Returns an effectful function that extracts out the second element of a tuple.

    Definition Classes
    ZIOFunctions
  6. final def absolve[R, E, A](v: ZIO[R, E, Either[E, A]]): ZIO[R, E, A]

    Permalink

    Submerges the error case of an Either into the ZIO.

    Submerges the error case of an Either into the ZIO. The inverse operation of IO.either.

    Definition Classes
    ZIOFunctions
  7. final def access[R]: AccessPartiallyApplied[R]

    Permalink

    Accesses the environment of the effect.

    Accesses the environment of the effect.

    val portNumber = effect.access(_.config.portNumber)
    Definition Classes
    ZIOFunctions
  8. final def accessM[R]: AccessMPartiallyApplied[R]

    Permalink

    Effectfully accesses the environment of the effect.

    Effectfully accesses the environment of the effect.

    Definition Classes
    ZIOFunctions
  9. final def allowInterrupt: UIO[Unit]

    Permalink

    Makes an explicit check to see if the fiber has been interrupted, and if so, performs self-interruption

    Makes an explicit check to see if the fiber has been interrupted, and if so, performs self-interruption

    Definition Classes
    ZIOFunctions
  10. def apply[A](a: ⇒ A): Task[A]

    Permalink
  11. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  12. final def bracket[R, E, A, B](acquire: ZIO[R, E, A], release: (A) ⇒ ZIO[R, Nothing, _], use: (A) ⇒ ZIO[R, E, B]): ZIO[R, E, B]

    Permalink

    Uncurried version.

    Uncurried version. Doesn't offer curried syntax and have worse type-inference characteristics, but guarantees no extra allocations of intermediate zio.ZIO.BracketAcquire and zio.ZIO.BracketRelease objects.

    Definition Classes
    ZIOFunctions
  13. final def bracket[R, E, A](acquire: ZIO[R, E, A]): BracketAcquire[R, E, A]

    Permalink

    When this effect represents acquisition of a resource (for example, opening a file, launching a thread, etc.), bracket can be used to ensure the acquisition is not interrupted and the resource is always released.

    When this effect represents acquisition of a resource (for example, opening a file, launching a thread, etc.), bracket can be used to ensure the acquisition is not interrupted and the resource is always released.

    The function does two things:

    1. Ensures this effect, which acquires the resource, will not be interrupted. Of course, acquisition may fail for internal reasons (an uncaught exception). 2. Ensures the release effect will not be interrupted, and will be executed so long as this effect successfully acquires the resource.

    In between acquisition and release of the resource, the use effect is executed.

    If the release effect fails, then the entire effect will fail even if the use effect succeeds. If this fail-fast behavior is not desired, errors produced by the release effect can be caught and ignored.

    openFile("data.json").bracket(closeFile) { file =>
      for {
        header <- readHeader(file)
        ...
      } yield result
    }
    Definition Classes
    ZIOFunctions
  14. final def bracketExit[R, E, A, B](acquire: ZIO[R, E, A], release: (A, Exit[E, B]) ⇒ ZIO[R, Nothing, _], use: (A) ⇒ ZIO[R, E, B]): ZIO[R, E, B]

    Permalink

    Uncurried version.

    Uncurried version. Doesn't offer curried syntax and have worse type-inference characteristics, but guarantees no extra allocations of intermediate zio.ZIO.BracketExitAcquire and zio.ZIO.BracketExitRelease objects.

    Definition Classes
    ZIOFunctions
  15. final def bracketExit[R, E, A](acquire: ZIO[R, E, A]): BracketExitAcquire[R, E, A]

    Permalink

    Acquires a resource, uses the resource, and then releases the resource.

    Acquires a resource, uses the resource, and then releases the resource. Neither the acquisition nor the release will be interrupted, and the resource is guaranteed to be released, so long as the acquire effect succeeds. If use fails, then after release, the returned effect will fail with the same error.

    Definition Classes
    ZIOFunctions
  16. final def checkInterruptible[R, E, A](f: (zio.InterruptStatus) ⇒ ZIO[R, E, A]): ZIO[R, E, A]

    Permalink

    Checks the interrupt status, and produces the effect returned by the specified callback.

    Checks the interrupt status, and produces the effect returned by the specified callback.

    Definition Classes
    ZIOFunctions
  17. final def checkSupervised[R, E, A](f: (zio.SuperviseStatus) ⇒ ZIO[R, E, A]): ZIO[R, E, A]

    Permalink

    Checks supervision status.

    Checks supervision status.

    Definition Classes
    ZIOFunctions
  18. final def checkTraced[R, E, A](f: (zio.TracingStatus) ⇒ ZIO[R, E, A]): ZIO[R, E, A]

    Permalink

    Checks the ZIO Tracing status, and produces the effect returned by the specified callback.

    Checks the ZIO Tracing status, and produces the effect returned by the specified callback.

    Definition Classes
    ZIOFunctions
  19. final def children: UIO[IndexedSeq[Fiber[_, _]]]

    Permalink

    Provides access to the list of child fibers supervised by this fiber.

    Provides access to the list of child fibers supervised by this fiber.

    Note: supervision must be enabled (via ZIO#supervised) on the current fiber for this operation to return non-empty lists.

    Definition Classes
    ZIOFunctions
  20. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  21. final def collectAll[R, E, A](in: Iterable[ZIO[R, E, A]]): ZIO[R, E, List[A]]

    Permalink

    Evaluate each effect in the structure from left to right, and collect the results.

    Evaluate each effect in the structure from left to right, and collect the results. For a parallel version, see collectAllPar.

    Definition Classes
    ZIOFunctions
  22. final def collectAllPar[R, E, A](as: Iterable[ZIO[R, E, A]]): ZIO[R, E, List[A]]

    Permalink

    Evaluate each effect in the structure in parallel, and collect the results.

    Evaluate each effect in the structure in parallel, and collect the results. For a sequential version, see collectAll.

    Definition Classes
    ZIOFunctions
  23. final def collectAllParN[R, E, A](n: Int)(as: Iterable[ZIO[R, E, A]]): ZIO[R, E, List[A]]

    Permalink

    Evaluate each effect in the structure in parallel, and collect the results.

    Evaluate each effect in the structure in parallel, and collect the results. For a sequential version, see collectAll.

    Unlike collectAllPar, this method will use at most n fibers.

    Definition Classes
    ZIOFunctions
  24. final def collectAllSuccesses[R, E, A](in: Iterable[ZIO[R, E, A]]): ZIO[R, Nothing, List[A]]

    Permalink

    Evaluate and run each effect in the structure and collect discarding failed ones.

    Evaluate and run each effect in the structure and collect discarding failed ones.

    Definition Classes
    ZIOFunctions
  25. final def collectAllSuccessesPar[R, E, A](in: Iterable[ZIO[R, E, A]]): ZIO[R, Nothing, List[A]]

    Permalink

    Evaluate and run each effect in the structure in parallel, and collect discarding failed ones.

    Evaluate and run each effect in the structure in parallel, and collect discarding failed ones.

    Definition Classes
    ZIOFunctions
  26. final def collectAllSuccessesParN[R, E, A](n: Int)(in: Iterable[ZIO[R, E, A]]): ZIO[R, Nothing, List[A]]

    Permalink

    Evaluate and run each effect in the structure in parallel, and collect discarding failed ones.

    Evaluate and run each effect in the structure in parallel, and collect discarding failed ones.

    Unlike collectAllSuccessesPar, this method will use at most up to n fibers.

    Definition Classes
    ZIOFunctions
  27. final def collectAllWith[R, E, A, U](in: Iterable[ZIO[R, E, A]])(f: PartialFunction[A, U]): ZIO[R, E, List[U]]

    Permalink

    Evaluate each effect in the structure with collectAll, and collect the results with given partial function.

    Evaluate each effect in the structure with collectAll, and collect the results with given partial function.

    Definition Classes
    ZIOFunctions
  28. final def collectAllWithPar[R, E, A, U](in: Iterable[ZIO[R, E, A]])(f: PartialFunction[A, U]): ZIO[R, E, List[U]]

    Permalink

    Evaluate each effect in the structure with collectAllPar, and collect the results with given partial function.

    Evaluate each effect in the structure with collectAllPar, and collect the results with given partial function.

    Definition Classes
    ZIOFunctions
  29. final def collectAllWithParN[R, E, A, U](n: Int)(in: Iterable[ZIO[R, E, A]])(f: PartialFunction[A, U]): ZIO[R, E, List[U]]

    Permalink

    Evaluate each effect in the structure with collectAllPar, and collect the results with given partial function.

    Evaluate each effect in the structure with collectAllPar, and collect the results with given partial function.

    Unlike collectAllWithPar, this method will use at most up to n fibers.

    Definition Classes
    ZIOFunctions
  30. final def descriptor: UIO[Fiber.Descriptor]

    Permalink

    Returns information about the current fiber, such as its identity.

    Returns information about the current fiber, such as its identity.

    Definition Classes
    ZIOFunctions
  31. final def descriptorWith[R, E, A](f: (Fiber.Descriptor) ⇒ ZIO[R, E, A]): ZIO[R, E, A]

    Permalink

    Constructs an effect based on information about the current fiber, such as its identity.

    Constructs an effect based on information about the current fiber, such as its identity.

    Definition Classes
    ZIOFunctions
  32. final def die(t: Throwable): UIO[Nothing]

    Permalink

    Returns an effect that dies with the specified Throwable.

    Returns an effect that dies with the specified Throwable. This method can be used for terminating a fiber because a defect has been detected in the code.

    Definition Classes
    ZIOFunctions
  33. final def dieMessage(message: String): UIO[Nothing]

    Permalink

    Returns an effect that dies with a java.lang.RuntimeException having the specified text message.

    Returns an effect that dies with a java.lang.RuntimeException having the specified text message. This method can be used for terminating a fiber because a defect has been detected in the code.

    Definition Classes
    ZIOFunctions
  34. final def done[E, A](r: Exit[E, A]): IO[E, A]

    Permalink

    Returns an effect from a zio.Exit value.

    Returns an effect from a zio.Exit value.

    Definition Classes
    ZIOFunctions
  35. final def effect[A](effect: ⇒ A): Task[A]

    Permalink

    Imports a synchronous effect into a pure ZIO value, translating any throwables into a Throwable failure in the returned value.

    Imports a synchronous effect into a pure ZIO value, translating any throwables into a Throwable failure in the returned value.

    def putStrLn(line: String): Task[Unit] = Task.effect(println(line))
    Definition Classes
    ZIOFunctions
  36. final def effectAsync[R, E, A](register: ((ZIO[R, E, A]) ⇒ Unit) ⇒ Unit): ZIO[R, E, A]

    Permalink

    Imports an asynchronous effect into a pure ZIO value.

    Imports an asynchronous effect into a pure ZIO value. See effectAsyncMaybe for the more expressive variant of this function that can return a value synchronously.

    The callback function ZIO[R, E, A] => Unit must be called at most once.

    Definition Classes
    ZIOFunctions
  37. final def effectAsyncInterrupt[R, E, A](register: ((ZIO[R, E, A]) ⇒ Unit) ⇒ Either[Canceler, ZIO[R, E, A]]): ZIO[R, E, A]

    Permalink

    Imports an asynchronous effect into a pure IO value.

    Imports an asynchronous effect into a pure IO value. The effect has the option of returning the value synchronously, which is useful in cases where it cannot be determined if the effect is synchronous or asynchronous until the effect is actually executed. The effect also has the option of returning a canceler, which will be used by the runtime to cancel the asynchronous effect if the fiber executing the effect is interrupted.

    If the register function returns a value synchronously then the callback function ZIO[R, E, A] => Unit must not be called. Otherwise the callback function must be called at most once.

    Definition Classes
    ZIOFunctions
  38. final def effectAsyncM[R, E, A](register: ((ZIO[R, E, A]) ⇒ Unit) ⇒ ZIO[R, E, _]): ZIO[R, E, A]

    Permalink

    Imports an asynchronous effect into a pure ZIO value.

    Imports an asynchronous effect into a pure ZIO value. This formulation is necessary when the effect is itself expressed in terms of ZIO.

    Definition Classes
    ZIOFunctions
  39. final def effectAsyncMaybe[R, E, A](register: ((ZIO[R, E, A]) ⇒ Unit) ⇒ Option[ZIO[R, E, A]]): ZIO[R, E, A]

    Permalink

    Imports an asynchronous effect into a pure ZIO value, possibly returning the value synchronously.

    Imports an asynchronous effect into a pure ZIO value, possibly returning the value synchronously.

    Definition Classes
    ZIOFunctions
  40. final def effectSuspend[R, A](rio: ⇒ RIO[R, A]): RIO[R, A]

    Permalink

    Returns a lazily constructed effect, whose construction may itself require effects.

    Returns a lazily constructed effect, whose construction may itself require effects. When no environment is required (i.e., when R == Any) it is conceptually equivalent to flatten(effect(io)).

    Definition Classes
    ZIOFunctions
  41. final def effectSuspendTotal[R, E, A](zio: ⇒ ZIO[R, E, A]): ZIO[R, E, A]

    Permalink

    Returns a lazily constructed effect, whose construction may itself require effects.

    Returns a lazily constructed effect, whose construction may itself require effects. The effect must not throw any exceptions. When no environment is required (i.e., when R == Any) it is conceptually equivalent to flatten(effectTotal(zio)). If you wonder if the effect throws exceptions, do not use this method, use Task.effectSuspend or ZIO.effectSuspend.

    Definition Classes
    ZIOFunctions
  42. final def effectSuspendTotalWith[R, E, A](p: (Platform) ⇒ ZIO[R, E, A]): ZIO[R, E, A]

    Permalink

    Returns a lazily constructed effect, whose construction may itself require effects.

    Returns a lazily constructed effect, whose construction may itself require effects. The effect must not throw any exceptions. When no environment is required (i.e., when R == Any) it is conceptually equivalent to flatten(effectTotal(zio)). If you wonder if the effect throws exceptions, do not use this method, use Task.effectSuspend or ZIO.effectSuspend.

    Definition Classes
    ZIOFunctions
  43. final def effectSuspendWith[R, A](p: (Platform) ⇒ RIO[R, A]): RIO[R, A]

    Permalink

    Returns a lazily constructed effect, whose construction may itself require effects.

    Returns a lazily constructed effect, whose construction may itself require effects. When no environment is required (i.e., when R == Any) it is conceptually equivalent to flatten(effect(io)).

    Definition Classes
    ZIOFunctions
  44. final def effectTotal[A](effect: ⇒ A): UIO[A]

    Permalink

    Imports a total synchronous effect into a pure ZIO value.

    Imports a total synchronous effect into a pure ZIO value. The effect must not throw any exceptions. If you wonder if the effect throws exceptions, then do not use this method, use Task.effect, IO.effect, or ZIO.effect.

    val nanoTime: UIO[Long] = IO.effectTotal(System.nanoTime())
    Definition Classes
    ZIOFunctions
  45. final def environment[R]: ZIO[R, Nothing, R]

    Permalink

    Accesses the whole environment of the effect.

    Accesses the whole environment of the effect.

    Definition Classes
    ZIOFunctions
  46. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  47. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  48. final def fail[E](error: E): IO[E, Nothing]

    Permalink

    Returns an effect that models failure with the specified error.

    Returns an effect that models failure with the specified error. The moral equivalent of throw for pure code.

    Definition Classes
    ZIOFunctions
  49. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  50. final def firstSuccessOf[R, R1 <: R, E, A](zio: ZIO[R, E, A], rest: Iterable[ZIO[R1, E, A]]): ZIO[R1, E, A]

    Permalink

    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
    ZIOFunctions
  51. final def flatten[R, E, A](zio: ZIO[R, E, ZIO[R, E, A]]): ZIO[R, E, A]

    Permalink

    Returns an effect that first executes the outer effect, and then executes the inner effect, returning the value from the inner effect, and effectively flattening a nested effect.

    Returns an effect that first executes the outer effect, and then executes the inner effect, returning the value from the inner effect, and effectively flattening a nested effect.

    Definition Classes
    ZIOFunctions
  52. final def foldLeft[R, E, S, A](in: Iterable[A])(zero: S)(f: (S, A) ⇒ ZIO[R, E, S]): ZIO[R, E, S]

    Permalink

    Folds an Iterable[A] using an effectful function f, working sequentially.

    Folds an Iterable[A] using an effectful function f, working sequentially.

    Definition Classes
    ZIOFunctions
  53. final def foreach[R, E, A, B](in: Iterable[A])(f: (A) ⇒ ZIO[R, E, B]): ZIO[R, E, List[B]]

    Permalink

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

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

    For a parallel version of this method, see foreachPar.

    Definition Classes
    ZIOFunctions
  54. final def foreachPar[R, E, A, B](as: Iterable[A])(fn: (A) ⇒ ZIO[R, E, B]): ZIO[R, E, List[B]]

    Permalink

    Applies the function f to each element of the Iterable[A] in parallel, and returns the results in a new List[B].

    Applies the function f to each element of the Iterable[A] in parallel, and returns the results in a new List[B].

    For a sequential version of this method, see foreach.

    Definition Classes
    ZIOFunctions
  55. final def foreachParN[R, E, A, B](n: Int)(as: Iterable[A])(fn: (A) ⇒ ZIO[R, E, B]): ZIO[R, E, List[B]]

    Permalink

    Applies the function f to each element of the Iterable[A] in parallel, and returns the results in a new List[B].

    Applies the function f to each element of the Iterable[A] in parallel, and returns the results in a new List[B].

    Unlike foreachPar, this method will use at most up to n fibers.

    Definition Classes
    ZIOFunctions
  56. final def foreachParN_[R, E, A](n: Int)(as: Iterable[A])(f: (A) ⇒ ZIO[R, E, _]): ZIO[R, E, Unit]

    Permalink

    Applies the function f to each element of the Iterable[A] and runs produced effects in parallel, discarding the results.

    Applies the function f to each element of the Iterable[A] and runs produced effects in parallel, discarding the results.

    Unlike foreachPar_, this method will use at most up to n fibers.

    Definition Classes
    ZIOFunctions
  57. final def foreachPar_[R, E, A](as: Iterable[A])(f: (A) ⇒ ZIO[R, E, _]): ZIO[R, E, Unit]

    Permalink

    Applies the function f to each element of the Iterable[A] and runs produced effects in parallel, discarding the results.

    Applies the function f to each element of the Iterable[A] and runs produced effects in parallel, discarding the results.

    For a sequential version of this method, see foreach_.

    Definition Classes
    ZIOFunctions
  58. final def foreach_[R, E, A](as: Iterable[A])(f: (A) ⇒ ZIO[R, E, _]): ZIO[R, E, Unit]

    Permalink

    Applies the function f to each element of the Iterable[A] and runs produced effects sequentially.

    Applies the function f to each element of the Iterable[A] and runs produced effects sequentially.

    Equivalent to foreach(as)(f).void, but without the cost of building the list of results.

    Definition Classes
    ZIOFunctions
  59. final def forkAll[R, E, A](as: Iterable[ZIO[R, E, A]]): ZIO[R, Nothing, Fiber[E, List[A]]]

    Permalink

    Returns an effect that forks all of the specified values, and returns a composite fiber that produces a list of their results, in order.

    Returns an effect that forks all of the specified values, and returns a composite fiber that produces a list of their results, in order.

    Definition Classes
    ZIOFunctions
  60. final def forkAll_[R, E, A](as: Iterable[ZIO[R, E, A]]): ZIO[R, Nothing, Unit]

    Permalink

    Returns an effect that forks all of the specified values, and returns a composite fiber that produces unit.

    Returns an effect that forks all of the specified values, and returns a composite fiber that produces unit. This version is faster than forkAll in cases where the results of the forked fibers are not needed.

    Definition Classes
    ZIOFunctions
  61. final def fromEither[E, A](v: ⇒ Either[E, A]): IO[E, A]

    Permalink

    Lifts an Either into a ZIO value.

    Lifts an Either into a ZIO value.

    Definition Classes
    ZIOFunctions
  62. final def fromFiber[E, A](fiber: ⇒ Fiber[E, A]): IO[E, A]

    Permalink

    Creates a ZIO value that represents the exit value of the specified fiber.

    Creates a ZIO value that represents the exit value of the specified fiber.

    Definition Classes
    ZIOFunctions
  63. final def fromFiberM[E, A](fiber: IO[E, Fiber[E, A]]): IO[E, A]

    Permalink

    Creates a ZIO value that represents the exit value of the specified fiber.

    Creates a ZIO value that represents the exit value of the specified fiber.

    Definition Classes
    ZIOFunctions
  64. final def fromFunction[R, A](f: (R) ⇒ A): ZIO[R, Nothing, A]

    Permalink

    Lifts a function R => A into a ZIO[R, Nothing, A].

    Lifts a function R => A into a ZIO[R, Nothing, A].

    Definition Classes
    ZIOFunctions
  65. final def fromFunctionM[R, E, A](f: (R) ⇒ IO[E, A]): ZIO[R, E, A]

    Permalink

    Lifts an effectful function whose effect requires no environment into an effect that requires the input to the function.

    Lifts an effectful function whose effect requires no environment into an effect that requires the input to the function.

    Definition Classes
    ZIOFunctions
  66. final def fromFuture[A](make: (ExecutionContext) ⇒ Future[A]): Task[A]

    Permalink

    Imports a function that creates a scala.concurrent.Future from an scala.concurrent.ExecutionContext into a ZIO.

    Imports a function that creates a scala.concurrent.Future from an scala.concurrent.ExecutionContext into a ZIO.

    Definition Classes
    ZIOFunctions
  67. final def fromOption[A](v: ⇒ Option[A]): IO[Unit, A]

    Permalink

    Lifts an Option into a ZIO.

    Lifts an Option into a ZIO.

    Definition Classes
    ZIOFunctions
  68. final def fromTry[A](value: ⇒ Try[A]): Task[A]

    Permalink

    Lifts a Try into a ZIO.

    Lifts a Try into a ZIO.

    Definition Classes
    ZIOFunctions
  69. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  70. final def halt[E](cause: Cause[E]): IO[E, Nothing]

    Permalink

    Returns an effect that models failure with the specified Cause.

    Returns an effect that models failure with the specified Cause.

    Definition Classes
    ZIOFunctions
  71. final def haltWith[E](function: (() ⇒ ZTrace) ⇒ Cause[E]): IO[E, Nothing]

    Permalink

    Returns an effect that models failure with the specified Cause.

    Returns an effect that models failure with the specified Cause.

    This version takes in a lazily-evaluated trace that can be attached to the Cause via Cause.Traced.

    Definition Classes
    ZIOFunctions
  72. final def handleChildrenWith[R, E, A](zio: ZIO[R, E, A])(supervisor: (IndexedSeq[Fiber[_, _]]) ⇒ ZIO[R, Nothing, _]): ZIO[R, E, A]

    Permalink

    Returns an effect that supervises the specified effect, ensuring that all fibers that it forks are passed to the specified supervisor as soon as the supervised effect completes.

    Returns an effect that supervises the specified effect, ensuring that all fibers that it forks are passed to the specified supervisor as soon as the supervised effect completes.

    Definition Classes
    ZIOFunctions
  73. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  74. final def identity[R]: ZIO[R, Nothing, R]

    Permalink

    Returns the identity effectful function, which performs no effects

    Returns the identity effectful function, which performs no effects

    Definition Classes
    ZIOFunctions
  75. final val interrupt: UIO[Nothing]

    Permalink

    Returns an effect that is interrupted.

    Returns an effect that is interrupted.

    Definition Classes
    ZIOFunctions
  76. final def interruptChildren[R, E, A](zio: ZIO[R, E, A]): ZIO[R, E, A]

    Permalink

    Returns a new effect that ensures that any fibers that are forked by the effect are interrupted when this effect completes.

    Returns a new effect that ensures that any fibers that are forked by the effect are interrupted when this effect completes.

    Definition Classes
    ZIOFunctions
  77. final def interruptible[R, E, A](zio: ZIO[R, E, A]): ZIO[R, E, A]

    Permalink

    Prefix form of ZIO#interruptible.

    Prefix form of ZIO#interruptible.

    Definition Classes
    ZIOFunctions
  78. final def interruptibleMask[R, E, A](k: (InterruptStatusRestore) ⇒ ZIO[R, E, A]): ZIO[R, E, A]

    Permalink

    Makes the effect interruptible, but passes it a restore function that can be used to restore the inherited interruptibility from whatever region the effect is composed into.

    Makes the effect interruptible, but passes it a restore function that can be used to restore the inherited interruptibility from whatever region the effect is composed into.

    Definition Classes
    ZIOFunctions
  79. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  80. final def left[A](a: A): UIO[Either[A, Nothing]]

    Permalink

    Returns an effect with the value on the left part.

    Returns an effect with the value on the left part.

    Definition Classes
    ZIOFunctions
  81. final def lock[R, E, A](executor: Executor)(zio: ZIO[R, E, A]): ZIO[R, E, A]

    Permalink

    Returns an effect that will execute the specified effect fully on the provided executor, before returning to the default executor.

    Returns an effect that will execute the specified effect fully on the provided executor, before returning to the default executor. See ZIO!.lock.

    Definition Classes
    ZIOFunctions
  82. final def mergeAll[R, E, A, B](in: Iterable[ZIO[R, E, A]])(zero: B)(f: (B, A) ⇒ B): ZIO[R, E, B]

    Permalink

    Merges an Iterable[IO] to a single IO, working sequentially.

    Merges an Iterable[IO] to a single IO, working sequentially.

    Definition Classes
    ZIOFunctions
  83. final def mergeAllPar[R, E, A, B](in: Iterable[ZIO[R, E, A]])(zero: B)(f: (B, A) ⇒ B): ZIO[R, E, B]

    Permalink

    Merges an Iterable[IO] to a single IO, working in parallel.

    Merges an Iterable[IO] to a single IO, working in parallel.

    Definition Classes
    ZIOFunctions
  84. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  85. final val never: UIO[Nothing]

    Permalink

    Returns a effect that will never produce anything.

    Returns a effect that will never produce anything. The moral equivalent of while(true) {}, only without the wasted CPU cycles.

    Definition Classes
    ZIOFunctions
  86. final val none: UIO[Option[Nothing]]

    Permalink

    Returns an effect with the empty value.

    Returns an effect with the empty value.

    Definition Classes
    ZIOFunctions
  87. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  88. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  89. final def provide[R, E, A](r: R): (ZIO[R, E, A]) ⇒ IO[E, A]

    Permalink

    Given an environment R, returns a function that can supply the environment to programs that require it, removing their need for any specific environment.

    Given an environment R, returns a function that can supply the environment to programs that require it, removing their need for any specific environment.

    This is similar to dependency injection, and the provide function can be thought of as inject.

    Definition Classes
    ZIOFunctions
  90. final def raceAll[R, R1 <: R, E, A](zio: ZIO[R, E, A], ios: Iterable[ZIO[R1, E, A]]): ZIO[R1, E, A]

    Permalink

    Races an IO[E, A] against zero or more other effects.

    Races an IO[E, A] against zero or more other effects. Yields either the first success or the last failure.

    Definition Classes
    ZIOFunctions
  91. final def reduceAll[R, R1 <: R, E, A](a: ZIO[R, E, A], as: Iterable[ZIO[R1, E, A]])(f: (A, A) ⇒ A): ZIO[R1, E, A]

    Permalink

    Reduces an Iterable[IO] to a single IO, working sequentially.

    Reduces an Iterable[IO] to a single IO, working sequentially.

    Definition Classes
    ZIOFunctions
  92. final def reduceAllPar[R, R1 <: R, E, A](a: ZIO[R, E, A], as: Iterable[ZIO[R1, E, A]])(f: (A, A) ⇒ A): ZIO[R1, E, A]

    Permalink

    Reduces an Iterable[IO] to a single IO, working in parallel.

    Reduces an Iterable[IO] to a single IO, working in parallel.

    Definition Classes
    ZIOFunctions
  93. def replicate[R, E, A](n: Int)(effect: ZIO[R, E, A]): Iterable[ZIO[R, E, A]]

    Permalink

    Replicates the given effect n times.

    Replicates the given effect n times. If 0 or negative numbers are given, an empty Iterable will return.

    Definition Classes
    ZIOFunctions
  94. final def require[R, E, A](error: E): (ZIO[R, E, Option[A]]) ⇒ ZIO[R, E, A]

    Permalink

    Requires that the given ZIO[R, E, Option[A]] contain a value.

    Requires that the given ZIO[R, E, Option[A]] contain a value. If there is no value, then the specified error will be raised.

    Definition Classes
    ZIOFunctions
  95. final def reserve[R, E, A, B](reservation: ZIO[R, E, Reservation[R, E, A]])(use: (A) ⇒ ZIO[R, E, B]): ZIO[R, E, B]

    Permalink

    Acquires a resource, uses the resource, and then releases the resource.

    Acquires a resource, uses the resource, and then releases the resource. However, unlike bracket, the separation of these phases allows the acquisition to be interruptible.

    Useful for concurrent data structures and other cases where the 'deallocator' can tell if the allocation succeeded or not just by inspecting internal / external state.

    Definition Classes
    ZIOFunctions
  96. def right[B](b: B): UIO[Either[Nothing, B]]

    Permalink

    Returns an effect with the value on the right part.

    Returns an effect with the value on the right part.

    Definition Classes
    ZIOFunctions
  97. final def runtime[R]: ZIO[R, Nothing, Runtime[R]]

    Permalink

    Returns an effect that accesses the runtime, which can be used to (unsafely) execute tasks.

    Returns an effect that accesses the runtime, which can be used to (unsafely) execute tasks. This is useful for integration with non-functional code that must call back into functional code.

    Definition Classes
    ZIOFunctions
  98. final def sequence[R, E, A](in: Iterable[ZIO[R, E, A]]): ZIO[R, E, List[A]]

    Permalink

    Alias for ZIO.collectAll

    Alias for ZIO.collectAll

    Definition Classes
    ZIOFunctions
  99. final def sequencePar[R, E, A](as: Iterable[ZIO[R, E, A]]): ZIO[R, E, List[A]]

    Permalink

    Alias for ZIO.collectAllPar

    Alias for ZIO.collectAllPar

    Definition Classes
    ZIOFunctions
  100. final def sequenceParN[R, E, A](n: Int)(as: Iterable[ZIO[R, E, A]]): ZIO[R, E, List[A]]

    Permalink

    Alias for ZIO.collectAllParN

    Alias for ZIO.collectAllParN

    Definition Classes
    ZIOFunctions
  101. final def sleep(duration: Duration): ZIO[Clock, Nothing, Unit]

    Permalink

    Sleeps for the specified duration.

    Sleeps for the specified duration. This method is asynchronous, and does not actually block the fiber.

    Definition Classes
    ZIOFunctions
  102. def some[A](a: A): UIO[Option[A]]

    Permalink

    Returns an effect with the optional value.

    Returns an effect with the optional value.

    Definition Classes
    ZIOFunctions
  103. final def succeed[A](a: A): UIO[A]

    Permalink

    Returns an effect that models success with the specified strictly- evaluated value.

    Returns an effect that models success with the specified strictly- evaluated value.

    Definition Classes
    ZIOFunctions
  104. final def superviseStatus[R, E, A](status: zio.SuperviseStatus)(zio: ZIO[R, E, A]): ZIO[R, E, A]

    Permalink

    Returns a new effect that has the same effects as this one, but with the supervision status changed as specified.

    Returns a new effect that has the same effects as this one, but with the supervision status changed as specified.

    Definition Classes
    ZIOFunctions
  105. final def supervised[R, E, A](zio: ZIO[R, E, A]): ZIO[R, E, A]

    Permalink

    Enables supervision for this effect.

    Enables supervision for this effect. This will cause fibers forked by this effect to be tracked and will enable their inspection via ZIO.children.

    Definition Classes
    ZIOFunctions
  106. final def swap[R, E, A, B](implicit ev: <:<[R, (A, B)]): ZIO[R, E, (B, A)]

    Permalink

    Returns an effectful function that merely swaps the elements in a Tuple2.

    Returns an effectful function that merely swaps the elements in a Tuple2.

    Definition Classes
    ZIOFunctions
  107. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  108. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  109. final def trace: UIO[ZTrace]

    Permalink

    Capture ZIO trace at the current point

    Capture ZIO trace at the current point

    Definition Classes
    ZIOFunctions
  110. final def traced[R, E, A](zio: ZIO[R, E, A]): ZIO[R, E, A]

    Permalink

    Prefix form of ZIO#traced.

    Prefix form of ZIO#traced.

    Definition Classes
    ZIOFunctions
  111. final def traverse[R, E, A, B](in: Iterable[A])(f: (A) ⇒ ZIO[R, E, B]): ZIO[R, E, List[B]]

    Permalink

    Alias for ZIO.foreach

    Alias for ZIO.foreach

    Definition Classes
    ZIOFunctions
  112. final def traversePar[R, E, A, B](as: Iterable[A])(fn: (A) ⇒ ZIO[R, E, B]): ZIO[R, E, List[B]]

    Permalink

    Alias for ZIO.foreachPar

    Alias for ZIO.foreachPar

    Definition Classes
    ZIOFunctions
  113. final def traverseParN[R, E, A, B](n: Int)(as: Iterable[A])(fn: (A) ⇒ ZIO[R, E, B]): ZIO[R, E, List[B]]

    Permalink

    Alias for ZIO.foreachParN

    Alias for ZIO.foreachParN

    Definition Classes
    ZIOFunctions
  114. final def traverseParN_[R, E, A](n: Int)(as: Iterable[A])(f: (A) ⇒ ZIO[R, E, _]): ZIO[R, E, Unit]

    Permalink

    Alias for ZIO.foreachParN_

    Alias for ZIO.foreachParN_

    Definition Classes
    ZIOFunctions
  115. final def traversePar_[R, E, A](as: Iterable[A])(f: (A) ⇒ ZIO[R, E, _]): ZIO[R, E, Unit]

    Permalink

    Alias for ZIO.foreachPar_

    Alias for ZIO.foreachPar_

    Definition Classes
    ZIOFunctions
  116. final def traverse_[R, E, A](as: Iterable[A])(f: (A) ⇒ ZIO[R, E, _]): ZIO[R, E, Unit]

    Permalink

    Alias for ZIO.foreach_

    Alias for ZIO.foreach_

    Definition Classes
    ZIOFunctions
  117. final def uninterruptible[R, E, A](zio: ZIO[R, E, A]): ZIO[R, E, A]

    Permalink

    Prefix form of ZIO#uninterruptible.

    Prefix form of ZIO#uninterruptible.

    Definition Classes
    ZIOFunctions
  118. final def uninterruptibleMask[R, E, A](k: (InterruptStatusRestore) ⇒ ZIO[R, E, A]): ZIO[R, E, A]

    Permalink

    Makes the effect uninterruptible, but passes it a restore function that can be used to restore the inherited interruptibility from whatever region the effect is composed into.

    Makes the effect uninterruptible, but passes it a restore function that can be used to restore the inherited interruptibility from whatever region the effect is composed into.

    Definition Classes
    ZIOFunctions
  119. final val unit: ZIO[Any, Nothing, Unit]

    Permalink

    Strictly-evaluated unit lifted into the ZIO monad.

    Strictly-evaluated unit lifted into the ZIO monad.

    Definition Classes
    ZIOFunctions
  120. final def unsandbox[R, E, A](v: ZIO[R, Cause[E], A]): ZIO[R, E, A]

    Permalink

    The inverse operation IO.sandboxed

    The inverse operation IO.sandboxed

    Terminates with exceptions on the Left side of the Either error, if it exists. Otherwise extracts the contained IO[E, A]

    Definition Classes
    ZIOFunctions
  121. final def unsupervised[R, E, A](zio: ZIO[R, E, A]): ZIO[R, E, A]

    Permalink

    Disables supervision for this effect.

    Disables supervision for this effect. This will cause fibers forked by this effect to not be tracked or appear in the list returned by ZIO.children.

    Definition Classes
    ZIOFunctions
  122. final def untraced[R, E, A](zio: ZIO[R, E, A]): ZIO[R, E, A]

    Permalink

    Prefix form of ZIO#untraced.

    Prefix form of ZIO#untraced.

    Definition Classes
    ZIOFunctions
  123. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  124. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  125. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  126. final def when[R, E](b: Boolean)(zio: ZIO[R, E, _]): ZIO[R, E, Unit]

    Permalink

    The moral equivalent of if (p) exp

    The moral equivalent of if (p) exp

    Definition Classes
    ZIOFunctions
  127. final def whenCase[R, E, A](a: A)(pf: PartialFunction[A, ZIO[R, E, _]]): ZIO[R, E, Unit]

    Permalink

    Runs an effect when the supplied PartialFunction matches for the given value, otherwise does nothing.

    Runs an effect when the supplied PartialFunction matches for the given value, otherwise does nothing.

    Definition Classes
    ZIOFunctions
  128. final def whenCaseM[R, E, A](a: ZIO[R, E, A])(pf: PartialFunction[A, ZIO[R, E, _]]): ZIO[R, E, Unit]

    Permalink

    Runs an effect when the supplied PartialFunction matches for the given effectful value, otherwise does nothing.

    Runs an effect when the supplied PartialFunction matches for the given effectful value, otherwise does nothing.

    Definition Classes
    ZIOFunctions
  129. final def whenM[R, E](b: ZIO[R, E, Boolean])(zio: ZIO[R, E, _]): ZIO[R, E, Unit]

    Permalink

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

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

    Definition Classes
    ZIOFunctions
  130. final val yieldNow: UIO[Unit]

    Permalink

    Returns an effect that yields to the runtime system, starting on a fresh stack.

    Returns an effect that yields to the runtime system, starting on a fresh stack. Manual use of this method can improve fairness, at the cost of overhead.

    Definition Classes
    ZIOFunctions

Deprecated Value Members

  1. final def succeedLazy[A](a: ⇒ A): UIO[A]

    Permalink
    Definition Classes
    ZIOFunctions
    Annotations
    @deprecated
    Deprecated

    (Since version 1.0.0) use effectTotal

  2. final def suspend[R, E, A](zio: ⇒ ZIO[R, E, A]): ZIO[R, E, A]

    Permalink
    Definition Classes
    ZIOFunctions
    Annotations
    @deprecated
    Deprecated

    (Since version 1.0.0) use effectSuspendTotal

  3. final def suspendWith[R, E, A](p: (Platform) ⇒ ZIO[R, E, A]): ZIO[R, E, A]

    Permalink
    Definition Classes
    ZIOFunctions
    Annotations
    @deprecated
    Deprecated

    (Since version 1.0.0) use effectSuspendTotalWith

Inherited from ZIOFunctions

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped