Returns an effectful function that extracts out the first element of a tuple.
Returns an effectful function that extracts out the second element of a tuple.
Submerges the error case of an Either into the ZManaged.
Submerges the error case of an Either into the ZManaged. The inverse
operation of ZManaged.either.
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.
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.
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.
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.
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.
Returns an effect from a scalaz.zio.Exit value.
Accesses the whole environment of the effect.
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.
Creates an effect that only executes the UIO value as its
release action.
Returns an effect that performs the outer effect first, followed by the inner effect, yielding the value of the inner effect.
Returns an effect that performs the outer effect first, followed by the inner effect, yielding the value of the inner effect.
This method can be used to "flatten" nested effects.
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.
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.
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.
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.
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_.
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.
Lifts a ZIO[R, E, R] into ZManaged[R, E, R] with no release action.
Lifts a ZIO[R, E, R] into ZManaged[R, E, R] with no release action. Use with care.
Lifts an Either into a ZManaged value.
Lifts a function R => A into a ZManaged[R, Nothing, A].
Lifts an effectful function whose effect requires no environment into an effect that requires the input to the function.
Returns an effect that models failure with the specified Cause.
Returns the identity effectful function, which performs no effects
Returns an effect that is interrupted.
Lifts a ZIO[R, E, R] into ZManaged[R, E, R] with a release action.
Merges an Iterable[IO] to a single IO, working sequentially.
Merges an Iterable[IO] to a single IO, working in parallel.
Merges an Iterable[IO] to a single IO, working in parallel.
Merges an Iterable[IO] to a single IO, working in parallel.
Unlike mergeAllPar, this method will use at most up to n fibers.
This is not implemented in terms of ZIO.foreach / ZManaged.zipWithPar as otherwise all reservation phases would always run, causing unnecessary work
Returns a ZManaged that never acquires a resource.
Reduces an Iterable[IO] to a single IO, working sequentially.
Reduces an Iterable[IO] to a single IO, working in parallel.
Reduces an Iterable[IO] to a single IO, working in parallel.
Reduces an Iterable[IO] to a single IO, working in parallel.
Unlike mergeAllPar, this method will use at most up to n fibers.
This is not implemented in terms of ZIO.foreach / ZManaged.zipWithPar as otherwise all reservation phases would always run, causing unnecessary work
Requires that the given ZManaged[E, Option[A]] contain a value.
Requires that the given ZManaged[E, Option[A]] contain a value. If there is no
value, then the specified error will be raised.
Lifts a pure Reservation[R, E, A] into ZManaged[R, E, A]
Lifts a strict, pure value into a Managed.
Lifts a by-name, pure value into a Managed.
Returns a lazily constructed Managed.
Returns an effectful function that merely swaps the elements in a Tuple2.
Returns the effect resulting from mapping the success of this effect to unit.
The inverse operation to sandbox.
The inverse operation to sandbox. Submerges the full cause of failure.
Unwraps a ZManaged that is inside a ZIO.
The moral equivalent of if (p) exp
The moral equivalent of if (p) exp when p has side-effects