Object/Trait

zio

ZIO

Related Docs: trait ZIO | package zio

Permalink

object ZIO extends ZIOCompanionPlatformSpecific with Serializable

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

Type Members

  1. final class Acquire[-R, +E, +A] extends AnyVal

    Permalink
  2. final class AcquireDiscard[-R, +E] extends AnyVal

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

    Permalink
  4. abstract class CanFilter[+E] extends AnyRef

    Permalink
    Annotations
    @implicitNotFound( ... )
  5. final class EnvironmentWithPartiallyApplied[R] extends AnyVal

    Permalink
  6. final class EnvironmentWithZIOPartiallyApplied[R] extends AnyVal

    Permalink
  7. final class GetStateWithPartiallyApplied[S] extends AnyVal

    Permalink
  8. final class Grafter extends AnyVal

    Permalink
  9. final class IfZIO[R, E] extends AnyVal

    Permalink
  10. final class InterruptStatusRestore extends AnyVal

    Permalink
  11. final class LogAnnotate extends AnyRef

    Permalink
  12. final class LogSpan extends AnyVal

    Permalink
  13. final class ProvideSomeLayer[R0, -R, +E, +A] extends AnyVal

    Permalink
  14. final class Release[-R, +E, +A] extends AnyRef

    Permalink
  15. final class ReleaseDiscard[-R, +E] extends AnyRef

    Permalink
  16. final class ReleaseExit[-R, +E, E1, +A, B] extends AnyRef

    Permalink
  17. final class ScopedPartiallyApplied[R] extends AnyVal

    Permalink
  18. final class ServiceAtPartiallyApplied[Service] extends AnyVal

    Permalink
  19. final class ServiceWithPartiallyApplied[Service] extends AnyVal

    Permalink
  20. final class ServiceWithZIOPartiallyApplied[Service] extends AnyVal

    Permalink
  21. final class StatefulPartiallyApplied[R] extends AnyVal

    Permalink
  22. final class TimeoutTo[-R, +E, +A, +B] extends AnyRef

    Permalink
  23. final class UnlessZIO[R, E] extends AnyVal

    Permalink
  24. final class UpdateService[-R, +E, +A, M] extends AnyVal

    Permalink
  25. final class UpdateServiceAt[-R, +E, +A, Service] extends AnyVal

    Permalink
  26. final class WhenZIO[R, E] extends AnyVal

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

    Permalink
  28. sealed trait ZIOConstructor[-Environment, +Error, In] extends AnyRef

    Permalink

    A ZIOConstructor[Input] knows how to construct a ZIO value from an input of type Input.

    A ZIOConstructor[Input] knows how to construct a ZIO value from an input of type Input. This allows the type of the ZIO value constructed to depend on Input. The constructed ZIO value is guaranteed not to require any services not included in Environment or to be able to fail in any ways not described by Error.

  29. trait ZIOConstructorLowPriority1 extends ZIOConstructorLowPriority2

    Permalink
  30. trait ZIOConstructorLowPriority2 extends ZIOConstructorLowPriority3

    Permalink
  31. trait ZIOConstructorLowPriority3 extends AnyRef

    Permalink
  32. implicit final class ZioRefineToOrDieOps[R, E <: Throwable, A] extends AnyVal

    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. object CanFilter

    Permalink
  5. object InterruptStatusRestore

    Permalink
  6. final lazy val Parallelism: FiberRef[Option[Int]]

    Permalink

    The level of parallelism for parallel operators.

  7. object ZIOConstructor extends ZIOConstructorLowPriority1

    Permalink
  8. def absolve[R, E, A](v: ⇒ ZIO[R, E, Either[E, A]])(implicit trace: ZTraceElement): 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.

  9. def acquireRelease[R, R1, E, A](acquire: ⇒ ZIO[R, E, A])(release: (A) ⇒ ZIO[R1, Nothing, Any])(implicit trace: ZTraceElement): ZIO[R with R1 with Scope, E, A]

    Permalink

    Constructs a scoped resource from an acquire and release effect.

    Constructs a scoped resource from an acquire and release effect. If acquire successfully completes execution then release will be added to the finalizers associated with the scope of this effect and is guaranteed to be run when the scope is closed.

    The acquire and release effects will be run uninterruptibly.

  10. def acquireReleaseExit[R, R1, E, A](acquire: ⇒ ZIO[R, E, A])(release: (A, Exit[Any, Any]) ⇒ ZIO[R1, Nothing, Any])(implicit trace: ZTraceElement): ZIO[R with R1 with Scope, E, A]

    Permalink

    A more powerful variant of acquireRelease that allows the release effect to depend on the Exit value specified when the scope is closed.

  11. def acquireReleaseExitWith[R, E, A, B](acquire: ⇒ ZIO[R, E, A], release: (A, Exit[E, B]) ⇒ URIO[R, Any], use: (A) ⇒ ZIO[R, E, B])(implicit trace: ZTraceElement): ZIO[R, E, B]

    Permalink

    Uncurried version.

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

  12. def acquireReleaseExitWith[R, E, A](acquire: ⇒ ZIO[R, E, A]): AcquireExit[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.

  13. def acquireReleaseInterruptible[R, R1, E, A](acquire: ⇒ ZIO[R, E, A])(release: ZIO[R1, Nothing, Any])(implicit trace: ZTraceElement): ZIO[R with R1 with Scope, E, A]

    Permalink

    A variant of acquireRelease that allows the acquire effect to be interruptible.

    A variant of acquireRelease that allows the acquire effect to be interruptible. Since the acquire effect could be interrupted after partially acquiring resources, the release effect is not allowed to access the resource produced by acquire and must independently determine what finalization, if any, needs to be performed (e.g. by examining in memory state).

  14. def acquireReleaseInterruptibleExit[R, R1, E, A](acquire: ⇒ ZIO[R, E, A])(release: (Exit[Any, Any]) ⇒ ZIO[R1, Nothing, Any])(implicit trace: ZTraceElement): ZIO[R with R1 with Scope, E, A]

    Permalink

    A more powerful variant of acquireReleaseInterruptible that allows the release effect to depend on the Exit value specified when the scope is closed.

  15. def acquireReleaseWith[R, E, A, B](acquire: ⇒ ZIO[R, E, A], release: (A) ⇒ URIO[R, Any], use: (A) ⇒ ZIO[R, E, B])(implicit trace: ZTraceElement): 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.Acquire and zio.ZIO.Release objects.

  16. def acquireReleaseWith[R, E, A](acquire: ⇒ ZIO[R, E, A]): Acquire[R, E, A]

    Permalink

    When this effect represents acquisition of a resource (for example, opening a file, launching a thread, etc.), acquireReleaseWith 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.), acquireReleaseWith 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").acquireReleaseWith(closeFile) { file =>
      for {
        header <- readHeader(file)
        ...
      } yield result
    }
  17. def addFinalizer[R](finalizer: ⇒ URIO[R, Any])(implicit trace: ZTraceElement): ZIO[R with Scope, Nothing, Any]

    Permalink

    Adds a finalizer to the scope of this effect.

    Adds a finalizer to the scope of this effect. The finalizer is guaranteed to be run when the scope is closed.

  18. def addFinalizerExit[R](finalizer: (Exit[Any, Any]) ⇒ URIO[R, Any])(implicit trace: ZTraceElement): ZIO[R with Scope, Nothing, Any]

    Permalink

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

  19. def allowInterrupt(implicit trace: ZTraceElement): UIO[Unit]

    Permalink

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

  20. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  21. def async[R, E, A](register: ((ZIO[R, E, A]) ⇒ Unit) ⇒ Any, blockingOn: ⇒ FiberId = FiberId.None)(implicit trace: ZTraceElement): ZIO[R, E, A]

    Permalink

    Imports an asynchronous side-effect into a pure ZIO value.

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

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

    The list of fibers, that may complete the async callback, is used to provide better diagnostics.

  22. def asyncInterrupt[R, E, A](register: ((ZIO[R, E, A]) ⇒ Unit) ⇒ Either[URIO[R, Any], ZIO[R, E, A]], blockingOn: ⇒ FiberId = FiberId.None)(implicit trace: ZTraceElement): ZIO[R, E, A]

    Permalink

    Imports an asynchronous side-effect into a ZIO effect.

    Imports an asynchronous side-effect into a ZIO effect. The side-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 side-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] => Any must not be called. Otherwise the callback function must be called at most once.

    The list of fibers, that may complete the async callback, is used to provide better diagnostics.

  23. def asyncMaybe[R, E, A](register: ((ZIO[R, E, A]) ⇒ Unit) ⇒ Option[ZIO[R, E, A]], blockingOn: ⇒ FiberId = FiberId.None)(implicit trace: ZTraceElement): 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.

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

    The list of fibers, that may complete the async callback, is used to provide better diagnostics.

  24. def asyncWithCompletionHandler[T](op: (CompletionHandler[T, Any]) ⇒ Any)(implicit trace: ZTraceElement): Task[T]

    Permalink
    Definition Classes
    ZIOCompanionPlatformSpecific
  25. def asyncZIO[R, E, A](register: ((ZIO[R, E, A]) ⇒ Unit) ⇒ ZIO[R, E, Any])(implicit trace: ZTraceElement): 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.

  26. def attempt[A](effect: ⇒ A)(implicit trace: ZTraceElement): Task[A]

    Permalink

    Imports a synchronous side-effect into a pure ZIO value, translating any thrown exceptions into typed failed effects creating with ZIO.fail.

    Imports a synchronous side-effect into a pure ZIO value, translating any thrown exceptions into typed failed effects creating with ZIO.fail.

    def printLine(line: String): Task[Unit] = Task.attempt(println(line))
  27. def attemptBlocking[A](effect: ⇒ A)(implicit trace: ZTraceElement): Task[A]

    Permalink

    Imports a synchronous effect that does blocking IO into a pure value.

  28. def attemptBlockingCancelable[R, A](effect: ⇒ A)(cancel: ⇒ URIO[R, Any])(implicit trace: ZTraceElement): RIO[R, A]

    Permalink

    Imports a synchronous effect that does blocking IO into a pure value, with a custom cancel effect.

    Imports a synchronous effect that does blocking IO into a pure value, with a custom cancel effect.

    If the returned ZIO is interrupted, the blocked thread running the synchronous effect will be interrupted via the cancel effect.

  29. def attemptBlockingIO[A](effect: ⇒ A)(implicit trace: ZTraceElement): IO[IOException, A]

    Permalink

    Imports a synchronous effect that does blocking IO into a pure value, refining the error type to java.io.IOException.

  30. def attemptBlockingInterrupt[A](effect: ⇒ A)(implicit trace: ZTraceElement): Task[A]

    Permalink

    Imports a synchronous effect that does blocking IO into a pure value.

    Imports a synchronous effect that does blocking IO into a pure value.

    If the returned ZIO is interrupted, the blocked thread running the synchronous effect will be interrupted via Thread.interrupt.

    Note that this adds significant overhead. For performance sensitive applications consider using attemptBlocking or attemptBlockingCancelable.

    Definition Classes
    ZIOCompanionPlatformSpecific
  31. def blocking[R, E, A](zio: ⇒ ZIO[R, E, A])(implicit trace: ZTraceElement): ZIO[R, E, A]

    Permalink

    Locks the specified effect to the blocking thread pool.

  32. def blockingExecutor(implicit trace: ZTraceElement): UIO[Executor]

    Permalink

    Retrieves the executor for all blocking tasks.

  33. def checkInterruptible[R, E, A](f: (zio.InterruptStatus) ⇒ ZIO[R, E, A])(implicit trace: ZTraceElement): ZIO[R, E, A]

    Permalink

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

  34. def clock(implicit trace: ZTraceElement): UIO[Clock]

    Permalink

    Retreives the Clock service for this workflow.

  35. def clockWith[R, E, A](f: (Clock) ⇒ ZIO[R, E, A])(implicit trace: ZTraceElement): ZIO[R, E, A]

    Permalink

    Retreives the Clock service for this workflow and uses it to run the specified workflow.

  36. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  37. def collect[R, E, Key, Key2, Value, Value2](map: Map[Key, Value])(f: (Key, Value) ⇒ ZIO[R, Option[E], (Key2, Value2)])(implicit trace: ZTraceElement): ZIO[R, E, Map[Key2, Value2]]

    Permalink

    Evaluate each effect in the structure from left to right, collecting the the successful values and discarding the empty cases.

    Evaluate each effect in the structure from left to right, collecting the the successful values and discarding the empty cases. For a parallel version, see collectPar.

  38. def collect[R, E, A, B, Collection[+Element] <: Iterable[Element]](in: Collection[A])(f: (A) ⇒ ZIO[R, Option[E], B])(implicit bf: zio.BuildFrom[Collection[A], B, Collection[B]], trace: ZTraceElement): ZIO[R, E, Collection[B]]

    Permalink

    Evaluate each effect in the structure from left to right, collecting the the successful values and discarding the empty cases.

    Evaluate each effect in the structure from left to right, collecting the the successful values and discarding the empty cases. For a parallel version, see collectPar.

  39. def collectAll[R, E, A](in: NonEmptyChunk[ZIO[R, E, A]])(implicit trace: ZTraceElement): ZIO[R, E, NonEmptyChunk[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.

  40. def collectAll[R, E, A](in: Option[ZIO[R, E, A]])(implicit trace: ZTraceElement): ZIO[R, E, Option[A]]

    Permalink

    Evaluate effect if present, and return its result as Option[A].

  41. def collectAll[R, E, A](in: Array[ZIO[R, E, A]])(implicit arg0: ClassTag[A], trace: ZTraceElement): ZIO[R, E, Array[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.

  42. def collectAll[R, E, A](in: Set[ZIO[R, E, A]])(implicit trace: ZTraceElement): ZIO[R, E, Set[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.

  43. def collectAll[R, E, A, Collection[+Element] <: Iterable[Element]](in: Collection[ZIO[R, E, A]])(implicit bf: zio.BuildFrom[Collection[ZIO[R, E, A]], A, Collection[A]], trace: ZTraceElement): ZIO[R, E, Collection[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.

  44. def collectAllDiscard[R, E, A](in: ⇒ Iterable[ZIO[R, E, A]])(implicit trace: ZTraceElement): ZIO[R, E, Unit]

    Permalink

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

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

  45. def collectAllPar[R, E, A](as: NonEmptyChunk[ZIO[R, E, A]])(implicit trace: ZTraceElement): ZIO[R, E, NonEmptyChunk[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.

  46. def collectAllPar[R, E, A](as: Array[ZIO[R, E, A]])(implicit arg0: ClassTag[A], trace: ZTraceElement): ZIO[R, E, Array[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.

  47. def collectAllPar[R, E, A](as: Set[ZIO[R, E, A]])(implicit trace: ZTraceElement): ZIO[R, E, Set[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.

  48. def collectAllPar[R, E, A, Collection[+Element] <: Iterable[Element]](as: Collection[ZIO[R, E, A]])(implicit bf: zio.BuildFrom[Collection[ZIO[R, E, A]], A, Collection[A]], trace: ZTraceElement): ZIO[R, E, Collection[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.

  49. def collectAllParDiscard[R, E, A](as: ⇒ Iterable[ZIO[R, E, A]])(implicit trace: ZTraceElement): ZIO[R, E, Unit]

    Permalink

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

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

  50. def collectAllSuccesses[R, E, A, Collection[+Element] <: Iterable[Element]](in: Collection[ZIO[R, E, A]])(implicit bf: zio.BuildFrom[Collection[ZIO[R, E, A]], A, Collection[A]], trace: ZTraceElement): URIO[R, Collection[A]]

    Permalink

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

  51. def collectAllSuccessesPar[R, E, A, Collection[+Element] <: Iterable[Element]](in: Collection[ZIO[R, E, A]])(implicit bf: zio.BuildFrom[Collection[ZIO[R, E, A]], A, Collection[A]], trace: ZTraceElement): URIO[R, Collection[A]]

    Permalink

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

  52. def collectAllWith[R, E, A, B, Collection[+Element] <: Iterable[Element]](in: Collection[ZIO[R, E, A]])(f: PartialFunction[A, B])(implicit bf: zio.BuildFrom[Collection[ZIO[R, E, A]], B, Collection[B]], trace: ZTraceElement): ZIO[R, E, Collection[B]]

    Permalink

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

  53. def collectAllWithPar[R, E, A, U, Collection[+Element] <: Iterable[Element]](in: Collection[ZIO[R, E, A]])(f: PartialFunction[A, U])(implicit bf: zio.BuildFrom[Collection[ZIO[R, E, A]], U, Collection[U]], trace: ZTraceElement): ZIO[R, E, Collection[U]]

    Permalink

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

  54. def collectFirst[R, E, A, B](as: ⇒ Iterable[A])(f: (A) ⇒ ZIO[R, E, Option[B]])(implicit trace: ZTraceElement): ZIO[R, E, Option[B]]

    Permalink

    Collects the first element of the Iterable[A] for which the effectual function f returns Some.

  55. def collectPar[R, E, Key, Key2, Value, Value2](map: Map[Key, Value])(f: (Key, Value) ⇒ ZIO[R, Option[E], (Key2, Value2)])(implicit trace: ZTraceElement): ZIO[R, E, Map[Key2, Value2]]

    Permalink

    Evaluate each effect in the structure from left to right, collecting the the successful values and discarding the empty cases.

    Evaluate each effect in the structure from left to right, collecting the the successful values and discarding the empty cases. For a parallel version, see collectPar.

  56. def collectPar[R, E, A, B, Collection[+Element] <: Iterable[Element]](in: Collection[A])(f: (A) ⇒ ZIO[R, Option[E], B])(implicit bf: zio.BuildFrom[Collection[A], B, Collection[B]], trace: ZTraceElement): ZIO[R, E, Collection[B]]

    Permalink

    Evaluate each effect in the structure in parallel, collecting the the successful values and discarding the empty cases.

  57. def cond[E, A](predicate: ⇒ Boolean, result: ⇒ A, error: ⇒ E)(implicit trace: ZTraceElement): IO[E, A]

    Permalink

    Similar to Either.cond, evaluate the predicate, return the given A as success if predicate returns true, and the given E as error otherwise

    Similar to Either.cond, evaluate the predicate, return the given A as success if predicate returns true, and the given E as error otherwise

    For effectful conditionals, see ZIO.ifZIO

  58. def console(implicit trace: ZTraceElement): UIO[Console]

    Permalink

    Retreives the Console service for this workflow.

  59. def consoleWith[R, E, A](f: (Console) ⇒ ZIO[R, E, A])(implicit trace: ZTraceElement): ZIO[R, E, A]

    Permalink

    Retreives the Console service for this workflow and uses it to run the specified workflow.

  60. def debug(value: ⇒ Any)(implicit trace: ZTraceElement): UIO[Unit]

    Permalink

    Prints the specified message to the console for debugging purposes.

  61. def descriptor(implicit trace: ZTraceElement): UIO[Fiber.Descriptor]

    Permalink

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

  62. def descriptorWith[R, E, A](f: (Fiber.Descriptor) ⇒ ZIO[R, E, A])(implicit trace: ZTraceElement): ZIO[R, E, A]

    Permalink

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

  63. def die(t: ⇒ Throwable)(implicit trace: ZTraceElement): 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.

  64. def dieMessage(message: ⇒ String)(implicit trace: ZTraceElement): 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.

  65. def done[E, A](r: ⇒ Exit[E, A])(implicit trace: ZTraceElement): IO[E, A]

    Permalink

    Returns an effect from a zio.Exit value.

  66. def environment[R](implicit trace: ZTraceElement): URIO[R, ZEnvironment[R]]

    Permalink

    Accesses the whole environment of the effect.

  67. def environmentWith[R]: EnvironmentWithPartiallyApplied[R]

    Permalink

    Accesses the environment of the effect.

  68. def environmentWithZIO[R]: EnvironmentWithZIOPartiallyApplied[R]

    Permalink

    Effectually accesses the environment of the effect.

  69. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  71. def executor(implicit trace: ZTraceElement): UIO[Executor]

    Permalink

    Retrieves the executor for this effect.

  72. def exists[R, E, A](as: ⇒ Iterable[A])(f: (A) ⇒ ZIO[R, E, Boolean])(implicit trace: ZTraceElement): ZIO[R, E, Boolean]

    Permalink

    Determines whether any element of the Iterable[A] satisfies the effectual predicate f.

  73. def fail[E](error: ⇒ E)(implicit trace: ZTraceElement): 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.

  74. def failCause[E](cause: ⇒ Cause[E])(implicit trace: ZTraceElement): IO[E, Nothing]

    Permalink

    Returns an effect that models failure with the specified Cause.

  75. def fiberId(implicit trace: ZTraceElement): UIO[FiberId]

    Permalink

    Returns the FiberId of the fiber executing the effect that calls this method.

  76. def filter[R, E, A](as: Set[A])(f: (A) ⇒ ZIO[R, E, Boolean])(implicit trace: ZTraceElement): ZIO[R, E, Set[A]]

    Permalink

    Filters the Set[A] using the specified effectual predicate.

  77. def filter[R, E, A, Collection[+Element] <: Iterable[Element]](as: Collection[A])(f: (A) ⇒ ZIO[R, E, Boolean])(implicit bf: zio.BuildFrom[Collection[A], A, Collection[A]], trace: ZTraceElement): ZIO[R, E, Collection[A]]

    Permalink

    Filters the collection using the specified effectual predicate.

  78. def filterNot[R, E, A](as: Set[A])(f: (A) ⇒ ZIO[R, E, Boolean])(implicit trace: ZTraceElement): ZIO[R, E, Set[A]]

    Permalink

    Filters the Set[A] using the specified effectual predicate, removing all elements that satisfy the predicate.

  79. def filterNot[R, E, A, Collection[+Element] <: Iterable[Element]](as: Collection[A])(f: (A) ⇒ ZIO[R, E, Boolean])(implicit bf: zio.BuildFrom[Collection[A], A, Collection[A]], trace: ZTraceElement): ZIO[R, E, Collection[A]]

    Permalink

    Filters the collection using the specified effectual predicate, removing all elements that satisfy the predicate.

  80. def filterNotPar[R, E, A](as: Set[A])(f: (A) ⇒ ZIO[R, E, Boolean])(implicit trace: ZTraceElement): ZIO[R, E, Set[A]]

    Permalink

    Filters the Set[A] in parallel using the specified effectual predicate, removing all elements that satisfy the predicate.

    Filters the Set[A] in parallel using the specified effectual predicate, removing all elements that satisfy the predicate.

    See zio.ZIO.filterNot[R,E,A](as:Set* for a sequential version.

  81. def filterNotPar[R, E, A, Collection[+Element] <: Iterable[Element]](as: Collection[A])(f: (A) ⇒ ZIO[R, E, Boolean])(implicit bf: zio.BuildFrom[Collection[A], A, Collection[A]], trace: ZTraceElement): ZIO[R, E, Collection[A]]

    Permalink

    Filters the collection in parallel using the specified effectual predicate, emoving all elements that satisfy the predicate.

    Filters the collection in parallel using the specified effectual predicate, emoving all elements that satisfy the predicate.

    See zio.ZIO.filterNot[R,E,A,Collection* for a sequential version.

  82. def filterPar[R, E, A](as: Set[A])(f: (A) ⇒ ZIO[R, E, Boolean])(implicit trace: ZTraceElement): ZIO[R, E, Set[A]]

    Permalink

    Filters the Set[A] in parallel using the specified effectual predicate.

    Filters the Set[A] in parallel using the specified effectual predicate.

    See zio.ZIO.filter[R,E,A,Collection* for a sequential version.

  83. def filterPar[R, E, A, Collection[+Element] <: Iterable[Element]](as: Collection[A])(f: (A) ⇒ ZIO[R, E, Boolean])(implicit bf: zio.BuildFrom[Collection[A], A, Collection[A]], trace: ZTraceElement): ZIO[R, E, Collection[A]]

    Permalink

    Filters the collection in parallel using the specified effectual predicate.

    Filters the collection in parallel using the specified effectual predicate.

    See zio.ZIO.filter[R,E,A,Collection* for a sequential version.

  84. def finalize(): Unit

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

    Permalink

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

  86. def flatten[R, E, A](zio: ⇒ ZIO[R, E, ZIO[R, E, A]])(implicit trace: ZTraceElement): 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.

  87. def foldLeft[R, E, S, A](in: ⇒ Iterable[A])(zero: ⇒ S)(f: (S, A) ⇒ ZIO[R, E, S])(implicit trace: ZTraceElement): ZIO[R, E, S]

    Permalink

    Folds an Iterable[A] using an effectual function f, working sequentially from left to right.

  88. def foldRight[R, E, S, A](in: ⇒ Iterable[A])(zero: ⇒ S)(f: (A, S) ⇒ ZIO[R, E, S])(implicit trace: ZTraceElement): ZIO[R, E, S]

    Permalink

    Folds an Iterable[A] using an effectual function f, working sequentially from right to left.

  89. def forall[R, E, A](as: ⇒ Iterable[A])(f: (A) ⇒ ZIO[R, E, Boolean])(implicit trace: ZTraceElement): ZIO[R, E, Boolean]

    Permalink

    Determines whether all elements of the Iterable[A] satisfy the effectual predicate f.

  90. final def foreach[R, E, A, B](in: NonEmptyChunk[A])(f: (A) ⇒ ZIO[R, E, B])(implicit trace: ZTraceElement): ZIO[R, E, NonEmptyChunk[B]]

    Permalink

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

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

    For a parallel version of this method, see foreachPar. If you do not need the results, see foreachDiscard for a more efficient implementation.

  91. final def foreach[R, E, A, B](in: Option[A])(f: (A) ⇒ ZIO[R, E, B])(implicit trace: ZTraceElement): ZIO[R, E, Option[B]]

    Permalink

    Applies the function f if the argument is non-empty and returns the results in a new Option[B].

  92. def foreach[R, E, Key, Key2, Value, Value2](map: Map[Key, Value])(f: (Key, Value) ⇒ ZIO[R, E, (Key2, Value2)])(implicit trace: ZTraceElement): ZIO[R, E, Map[Key2, Value2]]

    Permalink

    Applies the function f to each element of the Map[Key, Value] and returns the results in a new Map[Key2, Value2].

    Applies the function f to each element of the Map[Key, Value] and returns the results in a new Map[Key2, Value2].

    For a parallel version of this method, see foreachPar. If you do not need the results, see foreachDiscard for a more efficient implementation.

  93. final def foreach[R, E, A, B](in: Array[A])(f: (A) ⇒ ZIO[R, E, B])(implicit arg0: ClassTag[B], trace: ZTraceElement): ZIO[R, E, Array[B]]

    Permalink

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

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

    For a parallel version of this method, see foreachPar. If you do not need the results, see foreachDiscard for a more efficient implementation.

  94. final def foreach[R, E, A, B](in: Set[A])(f: (A) ⇒ ZIO[R, E, B])(implicit trace: ZTraceElement): ZIO[R, E, Set[B]]

    Permalink

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

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

    For a parallel version of this method, see foreachPar. If you do not need the results, see foreachDiscard for a more efficient implementation.

  95. def foreach[R, E, A, B, Collection[+Element] <: Iterable[Element]](in: Collection[A])(f: (A) ⇒ ZIO[R, E, B])(implicit bf: zio.BuildFrom[Collection[A], B, Collection[B]], trace: ZTraceElement): ZIO[R, E, Collection[B]]

    Permalink

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

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

    For a parallel version of this method, see foreachPar. If you do not need the results, see foreach_ for a more efficient implementation.

  96. def foreachDiscard[R, E, A](as: ⇒ Iterable[A])(f: (A) ⇒ ZIO[R, E, Any])(implicit trace: ZTraceElement): 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).unit, but without the cost of building the list of results.

  97. final def foreachExec[R, E, A, B, Collection[+Element] <: Iterable[Element]](as: Collection[A])(exec: ⇒ ExecutionStrategy)(f: (A) ⇒ ZIO[R, E, B])(implicit bf: zio.BuildFrom[Collection[A], B, Collection[B]], trace: ZTraceElement): ZIO[R, E, Collection[B]]

    Permalink

    Applies the function f to each element of the Collection[A] and returns the result in a new Collection[B] using the specified execution strategy.

  98. final def foreachPar[R, E, A, B](as: NonEmptyChunk[A])(fn: (A) ⇒ ZIO[R, E, B])(implicit trace: ZTraceElement): ZIO[R, E, NonEmptyChunk[B]]

    Permalink

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

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

    For a sequential version of this method, see foreach.

  99. def foreachPar[R, E, Key, Key2, Value, Value2](map: Map[Key, Value])(f: (Key, Value) ⇒ ZIO[R, E, (Key2, Value2)])(implicit trace: ZTraceElement): ZIO[R, E, Map[Key2, Value2]]

    Permalink

    Applies the function f to each element of the Map[Key, Value] in parallel and returns the results in a new Map[Key2, Value2].

    Applies the function f to each element of the Map[Key, Value] in parallel and returns the results in a new Map[Key2, Value2].

    For a sequential version of this method, see foreach.

  100. final def foreachPar[R, E, A, B](as: Array[A])(f: (A) ⇒ ZIO[R, E, B])(implicit arg0: ClassTag[B], trace: ZTraceElement): ZIO[R, E, Array[B]]

    Permalink

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

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

    For a sequential version of this method, see foreach.

  101. final def foreachPar[R, E, A, B](as: Set[A])(fn: (A) ⇒ ZIO[R, E, B])(implicit trace: ZTraceElement): ZIO[R, E, Set[B]]

    Permalink

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

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

    For a sequential version of this method, see foreach.

  102. def foreachPar[R, E, A, B, Collection[+Element] <: Iterable[Element]](as: Collection[A])(f: (A) ⇒ ZIO[R, E, B])(implicit bf: zio.BuildFrom[Collection[A], B, Collection[B]], trace: ZTraceElement): ZIO[R, E, Collection[B]]

    Permalink

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

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

    For a sequential version of this method, see foreach.

  103. def foreachParDiscard[R, E, A](as: ⇒ Iterable[A])(f: (A) ⇒ ZIO[R, E, Any])(implicit trace: ZTraceElement): 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 foreachDiscard.

    Optimized to avoid keeping full tree of effects, so that method could be able to handle large input sequences. Behaves almost like this code:

    as.foldLeft(ZIO.unit) { (acc, a) => acc.zipParLeft(f(a)) }

    Additionally, interrupts all effects on any failure.

  104. def forkAll[R, E, A, Collection[+Element] <: Iterable[Element]](as: Collection[ZIO[R, E, A]])(implicit bf: zio.BuildFrom[Collection[ZIO[R, E, A]], A, Collection[A]], trace: ZTraceElement): URIO[R, Fiber[E, Collection[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.

  105. def forkAllDiscard[R, E, A](as: ⇒ Iterable[ZIO[R, E, A]])(implicit trace: ZTraceElement): URIO[R, 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.

  106. def from[Input](input: ⇒ Input)(implicit constructor: ZIOConstructor[Nothing, Any, Input], trace: ZTraceElement): ZIO[OutEnvironment, OutError, OutSuccess]

    Permalink

    Constructs a ZIO value of the appropriate type for the specified input.

  107. def fromAutoCloseable[R, E, A <: AutoCloseable](fa: ⇒ ZIO[R, E, A])(implicit trace: ZTraceElement): ZIO[R with Scope, E, A]

    Permalink
  108. def fromCompletableFuture[A](cs: ⇒ CompletableFuture[A])(implicit trace: ZTraceElement): Task[A]

    Permalink

    Alias for formCompletionStage for a concrete implementation of CompletionStage

    Alias for formCompletionStage for a concrete implementation of CompletionStage

    Definition Classes
    ZIOCompanionPlatformSpecific
  109. def fromCompletionStage[A](cs: ⇒ CompletionStage[A])(implicit trace: ZTraceElement): Task[A]

    Permalink
    Definition Classes
    ZIOCompanionPlatformSpecific
  110. def fromEither[E, A](v: ⇒ Either[E, A])(implicit trace: ZTraceElement): IO[E, A]

    Permalink

    Lifts an Either into a ZIO value.

  111. def fromEitherCause[E, A](v: ⇒ Either[Cause[E], A])(implicit trace: ZTraceElement): IO[E, A]

    Permalink

    Lifts an Either into a ZIO value.

  112. def fromFiber[E, A](fiber: ⇒ Fiber[E, A])(implicit trace: ZTraceElement): IO[E, A]

    Permalink

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

  113. def fromFiberZIO[R, E, A](fiber: ⇒ ZIO[R, E, Fiber[E, A]])(implicit trace: ZTraceElement): ZIO[R, E, A]

    Permalink

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

  114. def fromFuture[A](make: (ExecutionContext) ⇒ Future[A])(implicit trace: ZTraceElement): Task[A]

    Permalink

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

  115. def fromFutureInterrupt[A](make: (ExecutionContext) ⇒ Future[A])(implicit trace: ZTraceElement): 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. The provided ExecutionContext will interrupt the Future between asynchronous operations such as map and flatMap if this effect is interrupted. Note that no attempt will be made to interrupt a Future blocking on a synchronous operation and that the Future must be created using the provided ExecutionContext.

  116. def fromFutureJava[A](future: ⇒ Future[A])(implicit trace: ZTraceElement): Task[A]

    Permalink

    WARNING: this uses the blocking Future#get, consider using fromCompletionStage

    WARNING: this uses the blocking Future#get, consider using fromCompletionStage

    Definition Classes
    ZIOCompanionPlatformSpecific
  117. def fromOption[A](v: ⇒ Option[A])(implicit trace: ZTraceElement): IO[Option[Nothing], A]

    Permalink

    Lifts an Option into a ZIO but preserves the error as an option in the error channel, making it easier to compose in some scenarios.

  118. def fromPromiseScala[A](promise: ⇒ scala.concurrent.Promise[A])(implicit trace: ZTraceElement): Task[A]

    Permalink

    Imports a scala.concurrent.Promise we generate a future from promise, and we pass to [fromFuture] to transform into Task[A]

  119. def fromTry[A](value: ⇒ Try[A])(implicit trace: ZTraceElement): Task[A]

    Permalink

    Lifts a Try into a ZIO.

  120. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  121. def getFiberRefs(implicit trace: ZTraceElement): UIO[FiberRefs]

    Permalink

    Returns a collection of all FiberRef values for the fiber running this effect.

  122. final def getOrFail[A](v: ⇒ Option[A])(implicit trace: ZTraceElement): Task[A]

    Permalink

    Lifts an Option into a ZIO, if the option is not defined it fails with NoSuchElementException.

  123. final def getOrFailUnit[A](v: ⇒ Option[A])(implicit trace: ZTraceElement): IO[Unit, A]

    Permalink

    Lifts an Option into a IO, if the option is not defined it fails with Unit.

  124. final def getOrFailWith[E, A](e: ⇒ E)(v: ⇒ Option[A])(implicit trace: ZTraceElement): IO[E, A]

    Permalink

    Lifts an Option into a ZIO.

    Lifts an Option into a ZIO. If the option is not defined, fail with the e value.

  125. def getState[S](implicit arg0: zio.EnvironmentTag[S], trace: ZTraceElement): ZIO[ZState[S], Nothing, S]

    Permalink

    Gets a state from the environment.

  126. def getStateWith[S]: GetStateWithPartiallyApplied[S]

    Permalink

    Gets a state from the environment and uses it to run the specified function.

  127. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  128. def ifZIO[R, E](b: ⇒ ZIO[R, E, Boolean]): IfZIO[R, E]

    Permalink

    Runs onTrue if the result of b is true and onFalse otherwise.

  129. def infinity(implicit trace: ZTraceElement): UIO[Nothing]

    Permalink

    Like never, but fibers that running this effect won't be garbage collected unless interrupted.

  130. def interrupt(implicit trace: ZTraceElement): UIO[Nothing]

    Permalink

    Returns an effect that is interrupted as if by the fiber calling this method.

  131. def interruptAs(fiberId: ⇒ FiberId)(implicit trace: ZTraceElement): UIO[Nothing]

    Permalink

    Returns an effect that is interrupted as if by the specified fiber.

  132. def interruptible[R, E, A](zio: ⇒ ZIO[R, E, A])(implicit trace: ZTraceElement): ZIO[R, E, A]

    Permalink

    Prefix form of ZIO#interruptible.

  133. def interruptibleMask[R, E, A](k: (InterruptStatusRestore) ⇒ ZIO[R, E, A])(implicit trace: ZTraceElement): 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.

  134. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  135. def iterate[R, E, S](initial: ⇒ S)(cont: (S) ⇒ Boolean)(body: (S) ⇒ ZIO[R, E, S])(implicit trace: ZTraceElement): ZIO[R, E, S]

    Permalink

    Iterates with the specified effectual function.

    Iterates with the specified effectual function. The moral equivalent of:

    var s = initial
    
    while (cont(s)) {
      s = body(s)
    }
    
    s
  136. def left[A](a: ⇒ A)(implicit trace: ZTraceElement): UIO[Either[A, Nothing]]

    Permalink

    Returns an effect with the value on the left part.

  137. def log(message: ⇒ String)(implicit trace: ZTraceElement): UIO[Unit]

    Permalink

    Logs the specified message at the current log level.

  138. def logAnnotate(key: ⇒ String, value: ⇒ String): LogAnnotate

    Permalink

    Annotates each log in this effect with the specified log annotation.

  139. def logAnnotations(implicit trace: ZTraceElement): UIO[Map[String, String]]

    Permalink

    Retrieves the log annotations associated with the current scope.

  140. def logCause(message: ⇒ String, cause: ⇒ Cause[Any])(implicit trace: ZTraceElement): UIO[Unit]

    Permalink

    Logs the specified message and cause at the current log level.

  141. def logCause(cause: ⇒ Cause[Any])(implicit trace: ZTraceElement): UIO[Unit]

    Permalink

    Logs the specified cause at the current log level.

  142. def logDebug(message: ⇒ String)(implicit trace: ZTraceElement): UIO[Unit]

    Permalink

    Logs the specified message at the debug log level.

  143. def logDebugCause(cause: ⇒ Cause[Any])(implicit trace: ZTraceElement): UIO[Unit]

    Permalink

    Logs the specified cause at the debug log level..

  144. def logDebugCause(message: String, cause: ⇒ Cause[Any])(implicit trace: ZTraceElement): UIO[Unit]

    Permalink

    Logs the specified cause at the debug log level.

  145. def logError(message: ⇒ String)(implicit trace: ZTraceElement): UIO[Unit]

    Permalink

    Logs the specified message at the error log level.

  146. def logErrorCause(cause: ⇒ Cause[Any])(implicit trace: ZTraceElement): UIO[Unit]

    Permalink

    Logs the specified cause as an error.

  147. def logErrorCause(message: String, cause: ⇒ Cause[Any])(implicit trace: ZTraceElement): UIO[Unit]

    Permalink

    Logs the specified cause as an error.

  148. def logFatal(message: ⇒ String)(implicit trace: ZTraceElement): UIO[Unit]

    Permalink

    Logs the specified message at the fatal log level.

  149. def logFatalCause(cause: ⇒ Cause[Any])(implicit trace: ZTraceElement): UIO[Unit]

    Permalink

    Logs the specified cause at the fatal log level.

  150. def logFatalCause(message: String, cause: ⇒ Cause[Any])(implicit trace: ZTraceElement): UIO[Unit]

    Permalink

    Logs the specified cause at the fatal log level.

  151. def logInfo(message: ⇒ String)(implicit trace: ZTraceElement): UIO[Unit]

    Permalink

    Logs the specified message at the informational log level.

  152. def logInfoCause(cause: ⇒ Cause[Any])(implicit trace: ZTraceElement): UIO[Unit]

    Permalink

    Logs the specified cause at the informational log level..

  153. def logInfoCause(message: String, cause: ⇒ Cause[Any])(implicit trace: ZTraceElement): UIO[Unit]

    Permalink

    Logs the specified cause at the informational log level.

  154. def logLevel(level: LogLevel): LogLevel

    Permalink

    Sets the log level for this effect.

    Sets the log level for this effect.

    ZIO.logLevel(LogLevel.Warning) {
      ZIO.log("The response time exceeded its threshold!")
    }
  155. def logSpan(label: ⇒ String): LogSpan

    Permalink

    Adjusts the label for the current logging span.

    Adjusts the label for the current logging span.

    ZIO.logSpan("parsing") { parseRequest(req) }
  156. def logTrace(message: ⇒ String)(implicit trace: ZTraceElement): UIO[Unit]

    Permalink

    Logs the specified message at the trace log level.

  157. def logTraceCause(cause: ⇒ Cause[Any])(implicit trace: ZTraceElement): UIO[Unit]

    Permalink

    Logs the specified cause at the trace log level..

  158. def logTraceCause(message: String, cause: ⇒ Cause[Any])(implicit trace: ZTraceElement): UIO[Unit]

    Permalink

    Logs the specified cause at the trace log level.

  159. def logWarning(message: ⇒ String)(implicit trace: ZTraceElement): UIO[Unit]

    Permalink

    Logs the specified message at the warning log level.

  160. def logWarningCause(cause: ⇒ Cause[Any])(implicit trace: ZTraceElement): UIO[Unit]

    Permalink

    Logs the specified cause at the warning log level..

  161. def logWarningCause(message: String, cause: ⇒ Cause[Any])(implicit trace: ZTraceElement): UIO[Unit]

    Permalink

    Logs the specified cause at the warning log level.

  162. def loop[R, E, A, S](initial: ⇒ S)(cont: (S) ⇒ Boolean, inc: (S) ⇒ S)(body: (S) ⇒ ZIO[R, E, A])(implicit trace: ZTraceElement): ZIO[R, E, List[A]]

    Permalink

    Loops with the specified effectual function, collecting the results into a list.

    Loops with the specified effectual function, collecting the results into a list. The moral equivalent of:

    var s  = initial
    var as = List.empty[A]
    
    while (cont(s)) {
      as = body(s) :: as
      s  = inc(s)
    }
    
    as.reverse
  163. def loopDiscard[R, E, S](initial: ⇒ S)(cont: (S) ⇒ Boolean, inc: (S) ⇒ S)(body: (S) ⇒ ZIO[R, E, Any])(implicit trace: ZTraceElement): ZIO[R, E, Unit]

    Permalink

    Loops with the specified effectual function purely for its effects.

    Loops with the specified effectual function purely for its effects. The moral equivalent of:

    var s = initial
    
    while (cont(s)) {
      body(s)
      s = inc(s)
    }
  164. def memoize[R, E, A, B](f: (A) ⇒ ZIO[R, E, B])(implicit trace: ZTraceElement): UIO[(A) ⇒ ZIO[R, E, B]]

    Permalink

    Returns a memoized version of the specified effectual function.

  165. def mergeAll[R, E, A, B](in: ⇒ Iterable[ZIO[R, E, A]])(zero: ⇒ B)(f: (B, A) ⇒ B)(implicit trace: ZTraceElement): ZIO[R, E, B]

    Permalink

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

  166. def mergeAllPar[R, E, A, B](in: ⇒ Iterable[ZIO[R, E, A]])(zero: ⇒ B)(f: (B, A) ⇒ B)(implicit trace: ZTraceElement): 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.

    Due to the parallel nature of this combinator, f must be both:

    • commutative: f(a, b) == f(b, a)
    • associative: f(a, f(b, c)) == f(f(a, b), c)

    It's unsafe to execute side effects inside f, as f may be executed more than once for some of in elements during effect execution.

  167. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  168. def never(implicit trace: ZTraceElement): 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. Fibers that suspended running this effect are automatically garbage collected on the JVM, because they cannot be reactivated.

  169. lazy val none: UIO[Option[Nothing]]

    Permalink

    Returns an effect with the empty value.

  170. def noneOrFail[E](o: ⇒ Option[E])(implicit trace: ZTraceElement): IO[E, Unit]

    Permalink

    Lifts an Option into a IO.

    Lifts an Option into a IO. If the option is empty it succeeds with Unit. If the option is defined it fails with the content.

  171. def noneOrFailWith[E, O](o: ⇒ Option[O])(f: (O) ⇒ E)(implicit trace: ZTraceElement): IO[E, Unit]

    Permalink

    Lifts an Option into a IO.

    Lifts an Option into a IO. If the option is empty it succeeds with Unit. If the option is defined it fails with an error adapted with f.

  172. def not[R, E](effect: ⇒ ZIO[R, E, Boolean])(implicit trace: ZTraceElement): ZIO[R, E, Boolean]

    Permalink

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

  173. final def notify(): Unit

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

    Permalink
    Definition Classes
    AnyRef
  175. def onExecutor[R, E, A](executor: ⇒ Executor)(zio: ZIO[R, E, A])(implicit trace: ZTraceElement): 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!.onExecutor.

  176. def parallelFinalizers[R, E, A](zio: ⇒ ZIO[R, E, A])(implicit trace: ZTraceElement): ZIO[R with Scope, E, A]

    Permalink
  177. def parallelism(implicit trace: ZTraceElement): UIO[Option[Int]]

    Permalink

    Retrieves the maximum number of fibers for parallel operators or None if it is unbounded.

  178. def parallelismWith[R, E, A](f: (Option[Int]) ⇒ ZIO[R, E, A])(implicit trace: ZTraceElement): ZIO[R, E, A]

    Permalink

    Retrieves the current maximum number of fibers for parallel operators and uses it to run the specified effect.

  179. def partition[R, E, A, B](in: ⇒ Iterable[A])(f: (A) ⇒ ZIO[R, E, B])(implicit ev: CanFail[E], trace: ZTraceElement): ZIO[R, Nothing, (Iterable[E], Iterable[B])]

    Permalink

    Feeds elements of type A to a function f that returns an effect.

    Feeds elements of type A to a function f that returns an effect. Collects all successes and failures in a tupled fashion.

  180. def partitionPar[R, E, A, B](in: ⇒ Iterable[A])(f: (A) ⇒ ZIO[R, E, B])(implicit ev: CanFail[E], trace: ZTraceElement): ZIO[R, Nothing, (Iterable[E], Iterable[B])]

    Permalink

    Feeds elements of type A to a function f that returns an effect.

    Feeds elements of type A to a function f that returns an effect. Collects all successes and failures in parallel and returns the result as a tuple.

  181. def provideEnvironment[R, E, A](r: ⇒ ZEnvironment[R])(implicit trace: ZTraceElement): (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.

  182. def provideLayer[RIn, E, ROut, RIn2, ROut2](layer: ZLayer[RIn, E, ROut])(zio: ZIO[ROut with RIn2, E, ROut2])(implicit ev: zio.EnvironmentTag[RIn2], tag: zio.EnvironmentTag[ROut], trace: ZTraceElement): ZIO[RIn with RIn2, E, ROut2]

    Permalink
  183. def raceAll[R, R1 <: R, E, A](zio: ⇒ ZIO[R, E, A], ios: ⇒ Iterable[ZIO[R1, E, A]])(implicit trace: ZTraceElement): 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.

  184. def random(implicit trace: ZTraceElement): UIO[Random]

    Permalink

    Retreives the Random service for this workflow.

  185. def randomWith[R, E, A](f: (Random) ⇒ ZIO[R, E, A])(implicit trace: ZTraceElement): ZIO[R, E, A]

    Permalink

    Retreives the Random service for this workflow and uses it to run the specified workflow.

  186. def readFile(path: String)(implicit trace: ZTraceElement): ZIO[Scope, IOException, ZInputStream]

    Permalink
    Definition Classes
    ZIOCompanionPlatformSpecific
  187. def readFile(path: Path)(implicit trace: ZTraceElement): ZIO[Scope, IOException, ZInputStream]

    Permalink
    Definition Classes
    ZIOCompanionPlatformSpecific
  188. def readURI(uri: URI)(implicit trace: ZTraceElement): ZIO[Scope, IOException, ZInputStream]

    Permalink
    Definition Classes
    ZIOCompanionPlatformSpecific
  189. def readURL(url: String)(implicit trace: ZTraceElement): ZIO[Scope, IOException, ZInputStream]

    Permalink
    Definition Classes
    ZIOCompanionPlatformSpecific
  190. def readURL(url: URL)(implicit trace: ZTraceElement): ZIO[Scope, IOException, ZInputStream]

    Permalink
    Definition Classes
    ZIOCompanionPlatformSpecific
  191. def reduceAll[R, R1 <: R, E, A](a: ⇒ ZIO[R, E, A], as: ⇒ Iterable[ZIO[R1, E, A]])(f: (A, A) ⇒ A)(implicit trace: ZTraceElement): ZIO[R1, E, A]

    Permalink

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

  192. def reduceAllPar[R, R1 <: R, E, A](a0: ⇒ ZIO[R, E, A], as0: ⇒ Iterable[ZIO[R1, E, A]])(f: (A, A) ⇒ A)(implicit trace: ZTraceElement): ZIO[R1, E, A]

    Permalink

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

  193. def replicate[R, E, A](n: Int)(effect: ZIO[R, E, A])(implicit trace: ZTraceElement): 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 be returned. This method is more efficient than using List.fill or similar methods, because the returned Iterable consumes only a small amount of heap regardless of n.

  194. def replicateZIO[R, E, A](n: ⇒ Int)(effect: ⇒ ZIO[R, E, A])(implicit trace: ZTraceElement): ZIO[R, E, Iterable[A]]

    Permalink

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

  195. def replicateZIODiscard[R, E, A](n: ⇒ Int)(effect: ⇒ ZIO[R, E, A])(implicit trace: ZTraceElement): ZIO[R, E, Unit]

    Permalink

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

  196. def right[B](b: ⇒ B)(implicit trace: ZTraceElement): UIO[Either[Nothing, B]]

    Permalink

    Returns an effect with the value on the right part.

  197. def runtime[R](implicit trace: ZTraceElement): URIO[R, 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 legacy code that must call back into ZIO code.

  198. def runtimeConfig(implicit trace: ZTraceElement): UIO[RuntimeConfig]

    Permalink

    Retrieves the runtimeConfig that this effect is running on.

  199. def scope(implicit trace: ZTraceElement): ZIO[Scope, Nothing, Scope]

    Permalink

    Returns the current scope.

  200. def scopeWith[R, E, A](f: (Scope) ⇒ ZIO[R, E, A])(implicit trace: ZTraceElement): ZIO[R with Scope, E, A]

    Permalink

    Accesses the current scope and uses it to perform the specified effect.

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

    Permalink

    Scopes all resources uses in this effect to the lifetime of the effect, ensuring that their finalizers are run as soon as this effect completes execution, whether by success, failure, or interruption.

    Scopes all resources uses in this effect to the lifetime of the effect, ensuring that their finalizers are run as soon as this effect completes execution, whether by success, failure, or interruption.

    ZIO.scoped {
      openFile(name).flatMap(useFile)
    }
  202. def service[A](implicit arg0: Tag[A], trace: ZTraceElement): URIO[A, A]

    Permalink

    Accesses the specified service in the environment of the effect.

  203. def serviceAt[Service]: ServiceAtPartiallyApplied[Service]

    Permalink

    Accesses the service corresponding to the specified key in the environment.

  204. def serviceWith[Service]: ServiceWithPartiallyApplied[Service]

    Permalink

    Accesses the specified service in the environment of the effect.

    Accesses the specified service in the environment of the effect.

    Especially useful for creating "accessor" methods on Services' companion objects.

    def foo(int: Int) = ZIO.serviceWith[Foo](_.foo(int))
  205. def serviceWithZIO[Service]: ServiceWithZIOPartiallyApplied[Service]

    Permalink

    Effectfully accesses the specified service in the environment of the effect.

    Effectfully accesses the specified service in the environment of the effect.

    Especially useful for creating "accessor" methods on Services' companion objects.

    def foo(int: Int) = ZIO.serviceWithZIO[Foo](_.foo(int))
  206. def setFiberRefs(fiberRefs: ⇒ FiberRefs)(implicit trace: ZTraceElement): UIO[Unit]

    Permalink

    Sets the FiberRef values for the fiber running this effect to the values in the specified collection of FiberRef values.

  207. def setRuntimeConfig(runtimeConfig: ⇒ RuntimeConfig)(implicit trace: ZTraceElement): UIO[Unit]

    Permalink

    Sets the runtime configuration to the specified value.

  208. def setState[S](s: ⇒ S)(implicit arg0: zio.EnvironmentTag[S], trace: ZTraceElement): ZIO[ZState[S], Nothing, Unit]

    Permalink

    Sets a state in the environment to the specified value.

  209. def shift(executor: ⇒ Executor)(implicit trace: ZTraceElement): UIO[Unit]

    Permalink

    Returns an effect that shifts execution to the specified executor.

    Returns an effect that shifts execution to the specified executor. This is useful to specify a default executor that effects sequenced after this one will be run on if they are not shifted somewhere else. It can also be used to implement higher level operators to manage where an effect is run such as ZIO!.onExecutor and ZIO!.onExecutionContext.

  210. def sleep(duration: ⇒ zio.Duration)(implicit trace: ZTraceElement): UIO[Unit]

    Permalink

    Returns an effect that suspends for the specified duration.

    Returns an effect that suspends for the specified duration. This method is asynchronous, and does not actually block the fiber executing the effect.

  211. def some[A](a: ⇒ A)(implicit trace: ZTraceElement): UIO[Option[A]]

    Permalink

    Returns an effect with the optional value.

  212. def stateful[R]: StatefulPartiallyApplied[R]

    Permalink

    Provides a stateful ZIO workflow with its initial state, resulting in a workflow that is ready to be run.

    Provides a stateful ZIO workflow with its initial state, resulting in a workflow that is ready to be run.

    ZIO.stateful(0) {
      for {
          _     <- ZIO.updateState[Int](_ + 1)
          state <- ZIO.getState[Int]
        } yield assertTrue(state == 1)
      }
  213. def succeed[A](a: ⇒ A)(implicit trace: ZTraceElement): ZIO[Any, Nothing, A]

    Permalink

    Returns an effect that models success with the specified value.

  214. def succeedBlocking[A](a: ⇒ A)(implicit trace: ZTraceElement): UIO[A]

    Permalink

    Returns a synchronous effect that does blocking and succeeds with the specified value.

  215. def succeedWith[A](f: (RuntimeConfig, FiberId) ⇒ A)(implicit trace: ZTraceElement): UIO[A]

    Permalink

    The same as ZIO.succeed, but also provides access to the underlying RuntimeConfig and fiber id.

  216. def suspend[R, A](rio: ⇒ RIO[R, A])(implicit trace: ZTraceElement): 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)).

  217. def suspendSucceed[R, E, A](zio: ⇒ ZIO[R, E, A])(implicit trace: ZTraceElement): 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(succeed(zio)). If you wonder if the effect throws exceptions, do not use this method, use Task.suspend or ZIO.suspend.

  218. def suspendSucceedWith[R, E, A](f: (RuntimeConfig, FiberId) ⇒ ZIO[R, E, A])(implicit trace: ZTraceElement): 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(succeed(zio)). If you wonder if the effect throws exceptions, do not use this method, use Task.suspend or ZIO.suspend.

  219. def suspendWith[R, A](f: (RuntimeConfig, FiberId) ⇒ RIO[R, A])(implicit trace: ZTraceElement): 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)).

  220. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  221. def system(implicit trace: ZTraceElement): UIO[System]

    Permalink

    Retreives the System service for this workflow.

  222. def systemWith[R, E, A](f: (System) ⇒ ZIO[R, E, A])(implicit trace: ZTraceElement): ZIO[R, E, A]

    Permalink

    Retreives the System service for this workflow and uses it to run the specified workflow.

  223. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  224. def trace(implicit trace: ZTraceElement): UIO[ZTrace]

    Permalink

    Capture ZIO trace at the current point

  225. def transplant[R, E, A](f: (Grafter) ⇒ ZIO[R, E, A])(implicit trace: ZTraceElement): ZIO[R, E, A]

    Permalink

    Transplants specified effects so that when those effects fork other effects, the forked effects will be governed by the scope of the fiber that executes this effect.

    Transplants specified effects so that when those effects fork other effects, the forked effects will be governed by the scope of the fiber that executes this effect.

    This can be used to "graft" deep grandchildren onto a higher-level scope, effectively extending their lifespans into the parent scope.

  226. def uninterruptible[R, E, A](zio: ⇒ ZIO[R, E, A])(implicit trace: ZTraceElement): ZIO[R, E, A]

    Permalink

    Prefix form of ZIO#uninterruptible.

  227. def uninterruptibleMask[R, E, A](k: (InterruptStatusRestore) ⇒ ZIO[R, E, A])(implicit trace: ZTraceElement): 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.

  228. lazy val unit: UIO[Unit]

    Permalink

    An effect that succeeds with a unit value.

  229. def unless[R, E, A](p: ⇒ Boolean)(zio: ⇒ ZIO[R, E, A])(implicit trace: ZTraceElement): ZIO[R, E, Option[A]]

    Permalink

    The moral equivalent of if (!p) exp

  230. def unlessZIO[R, E](p: ⇒ ZIO[R, E, Boolean]): UnlessZIO[R, E]

    Permalink

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

  231. def unsandbox[R, E, A](v: ⇒ ZIO[R, Cause[E], A])(implicit trace: ZTraceElement): 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]

  232. def unshift(implicit trace: ZTraceElement): UIO[Unit]

    Permalink

    Returns an effect indicating that execution is no longer required to be performed on the current executor.

    Returns an effect indicating that execution is no longer required to be performed on the current executor. The runtime may continue executing on this executor for efficiency but will not automatically shift back to it after completing an effect on another executor.

  233. def updateFiberRefs(f: (FiberId.Runtime, FiberRefs) ⇒ FiberRefs)(implicit trace: ZTraceElement): UIO[Unit]

    Permalink

    Updates the FiberRef values for the fiber running this effect using the specified function.

  234. def updateState[S](f: (S) ⇒ S)(implicit arg0: zio.EnvironmentTag[S], trace: ZTraceElement): ZIO[ZState[S], Nothing, Unit]

    Permalink

    Updates a state in the environment with the specified function.

  235. def validate[R, E, A, B](in: NonEmptyChunk[A])(f: (A) ⇒ ZIO[R, E, B])(implicit ev: CanFail[E], trace: ZTraceElement): ZIO[R, ::[E], NonEmptyChunk[B]]

    Permalink

    Feeds elements of type A to f and accumulates all errors in error channel or successes in success channel.

    Feeds elements of type A to f and accumulates all errors in error channel or successes in success channel.

    This combinator is lossy meaning that if there are errors all successes will be lost. To retain all information please use partition.

  236. def validate[R, E, A, B, Collection[+Element] <: Iterable[Element]](in: Collection[A])(f: (A) ⇒ ZIO[R, E, B])(implicit bf: zio.BuildFrom[Collection[A], B, Collection[B]], ev: CanFail[E], trace: ZTraceElement): ZIO[R, ::[E], Collection[B]]

    Permalink

    Feeds elements of type A to f and accumulates all errors in error channel or successes in success channel.

    Feeds elements of type A to f and accumulates all errors in error channel or successes in success channel.

    This combinator is lossy meaning that if there are errors all successes will be lost. To retain all information please use partition.

  237. def validateDiscard[R, E, A](in: ⇒ Iterable[A])(f: (A) ⇒ ZIO[R, E, Any])(implicit ev: CanFail[E], trace: ZTraceElement): ZIO[R, ::[E], Unit]

    Permalink

    Feeds elements of type A to f and accumulates all errors, discarding the successes.

  238. def validateFirst[R, E, A, B, Collection[+Element] <: Iterable[Element]](in: Collection[A])(f: (A) ⇒ ZIO[R, E, B])(implicit bf: zio.BuildFrom[Collection[A], E, Collection[E]], ev: CanFail[E], trace: ZTraceElement): ZIO[R, Collection[E], B]

    Permalink

    Feeds elements of type A to f until it succeeds.

    Feeds elements of type A to f until it succeeds. Returns first success or the accumulation of all errors.

  239. def validateFirstPar[R, E, A, B, Collection[+Element] <: Iterable[Element]](in: Collection[A])(f: (A) ⇒ ZIO[R, E, B])(implicit bf: zio.BuildFrom[Collection[A], E, Collection[E]], ev: CanFail[E], trace: ZTraceElement): ZIO[R, Collection[E], B]

    Permalink

    Feeds elements of type A to f, in parallel, until it succeeds.

    Feeds elements of type A to f, in parallel, until it succeeds. Returns first success or the accumulation of all errors.

    In case of success all other running fibers are terminated.

  240. def validatePar[R, E, A, B](in: NonEmptyChunk[A])(f: (A) ⇒ ZIO[R, E, B])(implicit ev: CanFail[E], trace: ZTraceElement): ZIO[R, ::[E], NonEmptyChunk[B]]

    Permalink

    Feeds elements of type A to f and accumulates, in parallel, all errors in error channel or successes in success channel.

    Feeds elements of type A to f and accumulates, in parallel, all errors in error channel or successes in success channel.

    This combinator is lossy meaning that if there are errors all successes will be lost. To retain all information please use partitionPar.

  241. def validatePar[R, E, A, B, Collection[+Element] <: Iterable[Element]](in: Collection[A])(f: (A) ⇒ ZIO[R, E, B])(implicit bf: zio.BuildFrom[Collection[A], B, Collection[B]], ev: CanFail[E], trace: ZTraceElement): ZIO[R, ::[E], Collection[B]]

    Permalink

    Feeds elements of type A to f and accumulates, in parallel, all errors in error channel or successes in success channel.

    Feeds elements of type A to f and accumulates, in parallel, all errors in error channel or successes in success channel.

    This combinator is lossy meaning that if there are errors all successes will be lost. To retain all information please use partitionPar.

  242. def validateParDiscard[R, E, A](in: ⇒ Iterable[A])(f: (A) ⇒ ZIO[R, E, Any])(implicit ev: CanFail[E], trace: ZTraceElement): ZIO[R, ::[E], Unit]

    Permalink

    Feeds elements of type A to f in parallel and accumulates all errors, discarding the successes.

  243. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  246. def when[R, E, A](p: ⇒ Boolean)(zio: ⇒ ZIO[R, E, A])(implicit trace: ZTraceElement): ZIO[R, E, Option[A]]

    Permalink

    The moral equivalent of if (p) exp

  247. def whenCase[R, E, A, B](a: ⇒ A)(pf: PartialFunction[A, ZIO[R, E, B]])(implicit trace: ZTraceElement): ZIO[R, E, Option[B]]

    Permalink

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

  248. def whenCaseZIO[R, E, A, B](a: ⇒ ZIO[R, E, A])(pf: PartialFunction[A, ZIO[R, E, B]])(implicit trace: ZTraceElement): ZIO[R, E, Option[B]]

    Permalink

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

  249. def whenZIO[R, E](p: ⇒ ZIO[R, E, Boolean]): WhenZIO[R, E]

    Permalink

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

  250. def withChildren[R, E, A](get: (UIO[Chunk[Fiber.Runtime[Any, Any]]]) ⇒ ZIO[R, E, A])(implicit trace: ZTraceElement): ZIO[R, E, A]

    Permalink

    Locally installs a supervisor and an effect that succeeds with all the children that have been forked in the returned effect.

  251. def withParallelism[R, E, A](n: ⇒ Int)(zio: ZIO[R, E, A])(implicit trace: ZTraceElement): ZIO[R, E, A]

    Permalink

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

  252. def withParallelismUnbounded[R, E, A](zio: ZIO[R, E, A])(implicit trace: ZTraceElement): ZIO[R, E, A]

    Permalink

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

  253. def withRuntimeConfig[R, E, A](runtimeConfig: ⇒ RuntimeConfig)(zio: ⇒ ZIO[R, E, A])(implicit trace: ZTraceElement): ZIO[R, E, A]

    Permalink

    Runs the specified effect on the specified runtime configuration, restoring the old runtime configuration when it completes execution.

  254. def writeFile(path: Path)(implicit trace: ZTraceElement): ZIO[Scope, IOException, ZOutputStream]

    Permalink
    Definition Classes
    ZIOCompanionPlatformSpecific
  255. def writeFile(path: String)(implicit trace: ZTraceElement): ZIO[Scope, IOException, ZOutputStream]

    Permalink
    Definition Classes
    ZIOCompanionPlatformSpecific
  256. def yieldNow(implicit trace: ZTraceElement): 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.

Inherited from Serializable

Inherited from Serializable

Inherited from ZIOCompanionPlatformSpecific

Inherited from AnyRef

Inherited from Any

Ungrouped