An Exit[E, A]
describes the result of executing an IO
value. The result is either succeeded with a value A
, or failed with a Cause[E]
.
Attributes
- Companion
- object
- Graph
-
- Supertypes
- Known subtypes
- Self type
-
Members list
Value members
Concrete methods
Parallelly zips the this result with the specified result discarding the first element of the tuple or else returns the failed Cause[E1]
Parallelly zips the this result with the specified result discarding the first element of the tuple or else returns the failed Cause[E1]
Attributes
Sequentially zips the this result with the specified result discarding the first element of the tuple or else returns the failed Cause[E1]
Sequentially zips the this result with the specified result discarding the first element of the tuple or else returns the failed Cause[E1]
Attributes
Parallelly zips the this result with the specified result discarding the second element of the tuple or else returns the failed Cause[E1]
Parallelly zips the this result with the specified result discarding the second element of the tuple or else returns the failed Cause[E1]
Attributes
Parallelly zips the this result with the specified result or else returns the failed Cause[E1]
Parallelly zips the this result with the specified result or else returns the failed Cause[E1]
Attributes
Sequentially zips the this result with the specified result discarding the second element of the tuple or else returns the failed Cause[E1]
Sequentially zips the this result with the specified result discarding the second element of the tuple or else returns the failed Cause[E1]
Attributes
Sequentially zips the this result with the specified result or else returns the failed Cause[E1]
Sequentially zips the this result with the specified result or else returns the failed Cause[E1]
Attributes
Maps the success value of this effect to the specified constant value.
Maps the success value of this effect to the specified constant value.
Attributes
- Definition Classes
Replaces the success value with the one provided.
Replaces the success value with the one provided.
Attributes
Returns an option of the cause of failure.
Returns an option of the cause of failure.
Attributes
Returns an effect that models the execution of this effect, followed by the passing of its value to the specified continuation function k
, followed by the effect that it returns.
Returns an effect that models the execution of this effect, followed by the passing of its value to the specified continuation function k
, followed by the effect that it returns.
val parsed = readFile("foo.txt").flatMap(file => parseFile(file))
Attributes
- Definition Classes
Flat maps over the value type.
Flat maps over the value type.
Attributes
Flat maps over the value type.
Flat maps over the value type.
Attributes
Flattens an Exit of an Exit into a single Exit value.
Flattens an Exit of an Exit into a single Exit value.
Attributes
Folds over the failure value or the success value to yield an effect that does not fail, but succeeds with the value returned by the left or right function passed to fold
.
Folds over the failure value or the success value to yield an effect that does not fail, but succeeds with the value returned by the left or right function passed to fold
.
Attributes
- Definition Classes
A more powerful version of fold
that allows recovering from any kind of failure except external interruption.
A more powerful version of fold
that allows recovering from any kind of failure except external interruption.
Attributes
- Definition Classes
A more powerful version of foldZIO
that allows recovering from any kind of failure except external interruption.
A more powerful version of foldZIO
that allows recovering from any kind of failure except external interruption.
Attributes
- Definition Classes
Folds over the value or cause.
Folds over the value or cause.
Attributes
Sequentially zips the this result with the specified result or else returns the failed Cause[E1]
Sequentially zips the this result with the specified result or else returns the failed Cause[E1]
Attributes
Applies the function f
to the successful result of the Exit
and returns the result in a new Exit
.
Applies the function f
to the successful result of the Exit
and returns the result in a new Exit
.
Attributes
Retrieves the A
if succeeded, or else returns the specified default A
.
Retrieves the A
if succeeded, or else returns the specified default A
.
Attributes
Determines if the result is a failure.
Determines if the result is a failure.
Attributes
Determines if the result is interrupted.
Determines if the result is interrupted.
Attributes
Determines if the result is a success.
Determines if the result is a success.
Attributes
Returns an effect whose success is mapped by the specified f
function.
Returns an effect whose success is mapped by the specified f
function.
Attributes
- Definition Classes
Returns an effect whose failure and success channels have been mapped by the specified pair of functions, f
and g
.
Returns an effect whose failure and success channels have been mapped by the specified pair of functions, f
and g
.
Attributes
- Definition Classes
Maps over both the error and value type.
Maps over both the error and value type.
Attributes
Returns an effect with its error channel mapped using the specified function. This can be used to lift a "smaller" error into a "larger" error.
Returns an effect with its error channel mapped using the specified function. This can be used to lift a "smaller" error into a "larger" error.
Attributes
- Definition Classes
Returns an effect with its full cause of failure mapped using the specified function. This can be used to transform errors while preserving the original structure of Cause
.
Returns an effect with its full cause of failure mapped using the specified function. This can be used to transform errors while preserving the original structure of Cause
.
Attributes
- See also
-
absorb, sandbox, catchAllCause - other functions for dealing with defects
- Definition Classes
Maps over the cause type.
Maps over the cause type.
Attributes
Maps over the error type.
Maps over the error type.
Attributes
Maps over the value type.
Maps over the value type.
Attributes
Executes this effect and returns its value, if it succeeds, but otherwise fails with the specified error.
Executes this effect and returns its value, if it succeeds, but otherwise fails with the specified error.
Attributes
- Definition Classes
Replaces the error value with the one provided.
Replaces the error value with the one provided.
Attributes
Converts the Exit
to an Either[Throwable, A]
, by wrapping the cause in FiberFailure
(if the result is failed).
Converts the Exit
to an Either[Throwable, A]
, by wrapping the cause in FiberFailure
(if the result is failed).
Attributes
Returns the effect resulting from mapping the success of this effect to unit.
Returns the effect resulting from mapping the success of this effect to unit.
Attributes
- Definition Classes
Returns an untraced exit value.
Returns an untraced exit value.
Attributes
Named alias for <*>
.
Named alias for <*>
.
Attributes
Named alias for <*
.
Named alias for <*
.
Attributes
Named alias for <&>
.
Named alias for <&>
.
Attributes
Named alias for <&
.
Named alias for <&
.
Attributes
Named alias for &>
.
Named alias for &>
.
Attributes
Named alias for *>
.
Named alias for *>
.
Attributes
Inherited methods
A symbolic alias for orDie
.
Returns an effect that executes both this effect and the specified effect, in parallel, returning result of provided effect. If either side fails, then the other side will be interrupted.
Returns an effect that executes both this effect and the specified effect, in parallel, returning result of provided effect. If either side fails, then the other side will be interrupted.
Attributes
- Inherited from:
- ZIO
A variant of flatMap
that ignores the value produced by this effect.
Returns an effect that executes both this effect and the specified effect, in parallel, this effect result returned. If either side fails, then the other side will be interrupted.
Returns an effect that executes both this effect and the specified effect, in parallel, this effect result returned. If either side fails, then the other side will be interrupted.
Attributes
- Inherited from:
- ZIO
Returns an effect that executes both this effect and the specified effect, in parallel, combining their results into a tuple. If either side fails, then the other side will be interrupted.
Returns an effect that executes both this effect and the specified effect, in parallel, combining their results into a tuple. If either side fails, then the other side will be interrupted.
Attributes
- Inherited from:
- ZIO
Sequences the specified effect after this effect, but ignores the value produced by the effect.
Sequences the specified effect after this effect, but ignores the value produced by the effect.
Attributes
- Inherited from:
- ZIO
Sequentially zips this effect with the specified effect, combining the results into a tuple.
Sequentially zips this effect with the specified effect, combining the results into a tuple.
Attributes
- Inherited from:
- ZIO
A symbolic alias for orElseEither
.
Operator alias for orElse
.
A symbolic alias for raceEither
.
Returns a new effect that applies the specified aspect to this effect. Aspects are "transformers" that modify the behavior of their input in some well-defined way (for example, adding a timeout).
Returns a new effect that applies the specified aspect to this effect. Aspects are "transformers" that modify the behavior of their input in some well-defined way (for example, adding a timeout).
Attributes
- Inherited from:
- ZIO
Returns an effect that submerges the error case of an Either
into the ZIO
. The inverse operation of ZIO.either
.
Returns an effect that submerges the error case of an Either
into the ZIO
. The inverse operation of ZIO.either
.
Attributes
- Inherited from:
- ZIO
Attempts to convert defects into a failure, throwing away all information about the cause of the failure.
Attempts to convert defects into a failure, throwing away all information about the cause of the failure.
Attributes
- Inherited from:
- ZIO
Attempts to convert defects into a failure, throwing away all information about the cause of the failure.
Attempts to convert defects into a failure, throwing away all information about the cause of the failure.
Attributes
- Inherited from:
- ZIO
Maps the success value of this effect to a left value.
Maps the error value of this effect to a left value.
Maps the success value of this effect to a right value.
Maps the error value of this effect to a right value.
Maps the success value of this effect to an optional value.
Maps the error value of this effect to an optional value.
Returns a new effect that will not succeed with its value before first waiting for the end of all child fibers forked by the effect.
Returns a new effect that will not succeed with its value before first waiting for the end of all child fibers forked by the effect.
Attributes
- Inherited from:
- ZIO
Returns an effect that, if evaluated, will return the cached result of this effect. Cached results will expire after timeToLive
duration.
Returns an effect that, if evaluated, will return the cached result of this effect. Cached results will expire after timeToLive
duration.
Attributes
- Inherited from:
- ZIO
Returns an effect that, if evaluated, will return the cached result of this effect. Cached results will expire after timeToLive
duration. In addition, returns an effect that can be used to invalidate the current cached value before the timeToLive
duration expires.
Returns an effect that, if evaluated, will return the cached result of this effect. Cached results will expire after timeToLive
duration. In addition, returns an effect that can be used to invalidate the current cached value before the timeToLive
duration expires.
Attributes
- Inherited from:
- ZIO
Recovers from all errors.
Recovers from all errors.
openFile("config.json").catchAll(_ => ZIO.succeed(defaultConfig))
Attributes
- Inherited from:
- ZIO
Recovers from all errors with provided Cause.
Recovers from all errors with provided Cause.
openFile("config.json").catchAllCause(_ => ZIO.succeed(defaultConfig))
Attributes
- See also
-
absorb, sandbox, mapErrorCause - other functions that can recover from defects
- Inherited from:
- ZIO
Recovers from all defects with provided function.
Recovers from all defects with provided function.
effect.catchSomeDefect(_ => backup())
'''WARNING''': There is no sensible way to recover from defects. This method should be used only at the boundary between ZIO and an external system, to transmit information on a defect for diagnostic or explanatory purposes.
Attributes
- Inherited from:
- ZIO
A version of catchAll
that gives you the (optional) trace of the error.
A version of catchAll
that gives you the (optional) trace of the error.
Attributes
- Inherited from:
- ZIO
Recovers from all NonFatal Throwables.
Recovers from all NonFatal Throwables.
openFile("data.json").catchNonFatalOrDie(_ => openFile("backup.json"))
Attributes
- Inherited from:
- ZIO
Recovers from some or all of the error cases.
Recovers from some or all of the error cases.
openFile("data.json").catchSome {
case _: FileNotFoundException => openFile("backup.json")
}
Attributes
- Inherited from:
- ZIO
Recovers from some or all of the error cases with provided cause.
Recovers from some or all of the error cases with provided cause.
openFile("data.json").catchSomeCause {
case c if (c.interrupted) => openFile("backup.json")
}
Attributes
- Inherited from:
- ZIO
Recovers from some or all of the defects with provided partial function.
Recovers from some or all of the defects with provided partial function.
effect.catchSomeDefect {
case _: SecurityException => backup()
}
'''WARNING''': There is no sensible way to recover from defects. This method should be used only at the boundary between ZIO and an external system, to transmit information on a defect for diagnostic or explanatory purposes.
Attributes
- Inherited from:
- ZIO
A version of catchSome
that gives you the trace of the error.
Returns an effect that succeeds with the cause of failure of this effect, or Cause.empty
if the effect did succeed.
Returns an effect that succeeds with the cause of failure of this effect, or Cause.empty
if the effect did succeed.
Attributes
- Inherited from:
- ZIO
Fail with e
if the supplied PartialFunction
does not match, otherwise succeed with the returned value.
Fail with e
if the supplied PartialFunction
does not match, otherwise succeed with the returned value.
Attributes
- Inherited from:
- ZIO
Fail with e
if the supplied PartialFunction
does not match, otherwise continue with the returned value.
Fail with e
if the supplied PartialFunction
does not match, otherwise continue with the returned value.
Attributes
- Inherited from:
- ZIO
Returns a new effect that will not supervise any fibers forked by this effect.
Returns a new effect that will not supervise any fibers forked by this effect.
Attributes
- Inherited from:
- ZIO
Taps the effect, printing the result of calling .toString
on the value. Prefixes the output with the given message.
Taps the effect, printing the result of calling .toString
on the value. Prefixes the output with the given message.
Attributes
- Inherited from:
- ZIO
Taps the effect, printing the result of calling .toString
on the value.
Taps the effect, printing the result of calling .toString
on the value.
Attributes
- Inherited from:
- ZIO
Returns an effect that is delayed from this effect by the specified zio.Duration.
Returns an effect that is delayed from this effect by the specified zio.Duration.
Attributes
- Inherited from:
- ZIO
Returns a new workflow that executes this one and captures the changes in FiberRef
values.
Returns a new workflow that executes this one and captures the changes in FiberRef
values.
Attributes
- Inherited from:
- ZIO
Returns an effect that is always interruptible, but whose interruption will be performed in the background.
Returns an effect that is always interruptible, but whose interruption will be performed in the background.
This method is useful to create "fast interrupting" effects. For example, if you call this on an acquire release effect, then even if the effect is "stuck" in acquire or release, its interruption will return immediately, while the acquire / release are performed in the background.
See timeout and race for other applications.
Attributes
- Inherited from:
- ZIO
Returns an effect whose failure and success have been lifted into an Either
. The resulting effect cannot fail, because the failure case has been exposed as part of the Either
success case.
Returns an effect whose failure and success have been lifted into an Either
. The resulting effect cannot fail, because the failure case has been exposed as part of the Either
success case.
This method is useful for recovering from ZIO
effects that may fail.
The error parameter of the returned ZIO
is Nothing
, since it is guaranteed the ZIO
effect does not model failure.
Attributes
- Inherited from:
- ZIO
Returns an effect that, if this effect starts execution, then the specified finalizer
is guaranteed to begin execution, whether this effect succeeds, fails, or is interrupted.
Returns an effect that, if this effect starts execution, then the specified finalizer
is guaranteed to begin execution, whether this effect succeeds, fails, or is interrupted.
For use cases that need access to the effect's result, see ZIO#onExit.
Finalizers offer very powerful guarantees, but they are low-level, and should generally not be used for releasing resources. For higher-level logic built on ensuring
, see ZIO#acquireReleaseWith
.
Attributes
- Inherited from:
- ZIO
Acts on the children of this fiber (collected into a single fiber), guaranteeing the specified callback will be invoked, whether or not this effect succeeds.
Acts on the children of this fiber (collected into a single fiber), guaranteeing the specified callback will be invoked, whether or not this effect succeeds.
Attributes
- Inherited from:
- ZIO
Acts on the children of this fiber, guaranteeing the specified callback will be invoked, whether or not this effect succeeds.
Acts on the children of this fiber, guaranteeing the specified callback will be invoked, whether or not this effect succeeds.
Attributes
- Inherited from:
- ZIO
Returns an effect that ignores errors and runs repeatedly until it eventually succeeds.
Returns an effect that ignores errors and runs repeatedly until it eventually succeeds.
Attributes
- Inherited from:
- ZIO
Maps this effect to the default exit codes.
Dies with specified Throwable
if the predicate fails.
Dies with a java.lang.RuntimeException having the specified text message if the predicate fails.
Dies with a java.lang.RuntimeException having the specified text message if the predicate fails.
Attributes
- Inherited from:
- ZIO
Dies with t
if the predicate fails.
Supplies zio
if the predicate fails.
Applies f
if the predicate fails.
Fails with e
if the predicate fails.
Returns an effect that runs this effect and in case of failure, runs each of the specified effects in order until one of them succeeds.
Returns an effect that runs this effect and in case of failure, runs each of the specified effects in order until one of them succeeds.
Attributes
- Inherited from:
- ZIO
Creates a composite effect that represents this effect followed by another one that may depend on the error produced by this one.
Creates a composite effect that represents this effect followed by another one that may depend on the error produced by this one.
val parsed = readFile("foo.txt").flatMapError(error => logErrorToFile(error))
Attributes
- Inherited from:
- ZIO
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.
Attributes
- Inherited from:
- ZIO
Unwraps the optional error, defaulting to the provided value.
Returns an effect that swaps the error/success cases. This allows you to use all methods on the error channel, possibly before flipping back.
Returns an effect that swaps the error/success cases. This allows you to use all methods on the error channel, possibly before flipping back.
Attributes
- Inherited from:
- ZIO
Swaps the error/value parameters, applies the function f
and flips the parameters back
Swaps the error/value parameters, applies the function f
and flips the parameters back
Attributes
- Inherited from:
- ZIO
A version of foldZIO
that gives you the trace of the error.
Recovers from errors by accepting one effect to execute for the case of an error, and one effect to execute for the case of success.
Recovers from errors by accepting one effect to execute for the case of an error, and one effect to execute for the case of success.
This method has better performance than either
since no intermediate value is allocated and does not require subsequent calls to flatMap
to define the next effect.
The error parameter of the returned IO
may be chosen arbitrarily, since it will depend on the IO
s returned by the given continuations.
Attributes
- Inherited from:
- ZIO
Returns a new effect that will pass the success value of this effect to the provided callback. If this effect fails, then the failure will be ignored.
Returns a new effect that will pass the success value of this effect to the provided callback. If this effect fails, then the failure will be ignored.
Attributes
- Inherited from:
- ZIO
Returns an effect that forks this effect into its own separate fiber, returning the fiber immediately, without waiting for it to begin executing the effect.
Returns an effect that forks this effect into its own separate fiber, returning the fiber immediately, without waiting for it to begin executing the effect.
You can use the fork
method whenever you want to execute an effect in a new fiber, concurrently and without "blocking" the fiber executing other effects. Using fibers can be tricky, so instead of using this method directly, consider other higher-level methods, such as raceWith
, zipPar
, and so forth.
The fiber returned by this method has methods to interrupt the fiber and to wait for it to finish executing the effect. See zio.Fiber for more information.
Whenever you use this method to launch a new fiber, the new fiber is attached to the parent fiber's scope. This means when the parent fiber terminates, the child fiber will be terminated as well, ensuring that no fibers leak. This behavior is called "auto supervision", and if this behavior is not desired, you may use the forkDaemon or forkIn methods.
for {
fiber <- subtask.fork
// Do stuff...
a <- fiber.join
} yield a
Attributes
- Inherited from:
- ZIO
Forks the effect into a new fiber attached to the global scope. Because the new fiber is attached to the global scope, when the fiber executing the returned effect terminates, the forked fiber will continue running.
Forks the effect into a new fiber attached to the global scope. Because the new fiber is attached to the global scope, when the fiber executing the returned effect terminates, the forked fiber will continue running.
Attributes
- Inherited from:
- ZIO
Forks the effect in the specified scope. The fiber will be interrupted when the scope is closed.
Forks the effect in the specified scope. The fiber will be interrupted when the scope is closed.
Attributes
- Inherited from:
- ZIO
Like fork but handles an error with the provided handler.
Returns a successful effect with the head of the list if the list is non-empty or fails with the error None
if the list is empty.
Returns a successful effect with the head of the list if the list is non-empty or fails with the error None
if the list is empty.
Attributes
- Inherited from:
- ZIO
Returns a new effect that ignores the success or failure of this effect.
Returns a new effect that ignores the success or failure of this effect.
Attributes
- Inherited from:
- ZIO
Returns a new effect that ignores the success or failure of this effect, but which also logs failures at the Debug level, just in case the failure turns out to be important.
Returns a new effect that ignores the success or failure of this effect, but which also logs failures at the Debug level, just in case the failure turns out to be important.
Attributes
- Inherited from:
- ZIO
Returns a new effect that will not succeed with its value before first interrupting all child fibers forked by the effect.
Returns a new effect that will not succeed with its value before first interrupting all child fibers forked by the effect.
Attributes
- Inherited from:
- ZIO
Switches the interrupt status for this effect. If true
is used, then the effect becomes interruptible (the default), while if false
is used, then the effect becomes uninterruptible. These changes are compositional, so they only affect regions of the effect.
Switches the interrupt status for this effect. If true
is used, then the effect becomes interruptible (the default), while if false
is used, then the effect becomes uninterruptible. These changes are compositional, so they only affect regions of the effect.
Attributes
- Inherited from:
- ZIO
Returns a new effect that performs the same operations as this effect, but interruptibly, even if composed inside of an uninterruptible region.
Returns a new effect that performs the same operations as this effect, but interruptibly, even if composed inside of an uninterruptible region.
Note that effects are interruptible by default, so this function only has meaning if used within an uninterruptible region.
WARNING: This operator "punches holes" into effects, allowing them to be interrupted in unexpected places. Do not use this operator unless you know exactly what you are doing. Instead, you should use ZIO.uninterruptibleMask.
Attributes
- Inherited from:
- ZIO
Returns an effect that keeps or breaks a promise based on the result of this effect. Synchronizes interruption, so if this effect is interrupted, the specified promise will be interrupted, too.
Returns an effect that keeps or breaks a promise based on the result of this effect. Synchronizes interruption, so if this effect is interrupted, the specified promise will be interrupted, too.
Attributes
- Inherited from:
- ZIO
Returns whether this effect is a failure.
Returns whether this effect is a success.
"Zooms in" on the value in the Left
side of an Either
, moving the possibility that the value is a Right
to the error channel.
"Zooms in" on the value in the Left
side of an Either
, moving the possibility that the value is a Right
to the error channel.
Attributes
- Inherited from:
- ZIO
Performs the specified operation while "zoomed in" on the Left
case of an Either
.
Performs the specified operation while "zoomed in" on the Left
case of an Either
.
Attributes
- Inherited from:
- ZIO
Logs the cause of failure of this workflow with the specified message.
Logs the cause of failure of this workflow with the specified message.
Attributes
- Inherited from:
- ZIO
Logs the cause of failure of this workflow.
Adjusts the label for the current logging span.
Adjusts the label for the current logging span.
parseRequest(req).logSpan("parsing")
Attributes
- Inherited from:
- ZIO
Returns an effect whose success is mapped by the specified side effecting f
function, translating any thrown exceptions into typed failed effects.
Returns an effect whose success is mapped by the specified side effecting f
function, translating any thrown exceptions into typed failed effects.
Attributes
- Inherited from:
- ZIO
Returns an effect that, if evaluated, will return the lazily computed result of this effect.
Returns an effect that, if evaluated, will return the lazily computed result of this effect.
Attributes
- Inherited from:
- ZIO
Returns a new effect where the error channel has been merged into the success channel to their common combined type.
Returns a new effect where the error channel has been merged into the success channel to their common combined type.
Attributes
- Inherited from:
- ZIO
Returns a new effect where boolean value of this effect is negated.
Requires the option produced by this value to be None
.
Attributes
- Inherited from:
- ZIO
Attributes
- Inherited from:
- ZIO
Runs the specified effect if this effect fails, providing the error to the effect if it exists. The provided effect will not be interrupted.
Runs the specified effect if this effect fails, providing the error to the effect if it exists. The provided effect will not be interrupted.
Attributes
- Inherited from:
- ZIO
Executes the effect on the specified ExecutionContext
and then shifts back to the default one.
Executes the effect on the specified ExecutionContext
and then shifts back to the default one.
Attributes
- Inherited from:
- ZIO
Returns an effect which is guaranteed to be executed on the specified executor. The specified effect will always run on the specified executor, even in the presence of asynchronous boundaries.
Returns an effect which is guaranteed to be executed on the specified executor. The specified effect will always run on the specified executor, even in the presence of asynchronous boundaries.
This is useful when an effect must be executed somewhere, for example: on a UI thread, inside a client library's thread pool, inside a blocking thread pool, inside a low-latency thread pool, or elsewhere.
The onExecutor
function composes with the innermost onExecutor
taking priority. Use of this method does not alter the execution semantics of other effects composed with this one, making it easy to compositionally reason about where effects are running.
Attributes
- Inherited from:
- ZIO
Ensures that a cleanup functions runs, whether this effect succeeds, fails, or is interrupted.
Ensures that a cleanup functions runs, whether this effect succeeds, fails, or is interrupted.
Attributes
- Inherited from:
- ZIO
Calls the specified function, and runs the effect it returns, if this effect is interrupted.
Calls the specified function, and runs the effect it returns, if this effect is interrupted.
Attributes
- Inherited from:
- ZIO
Runs the specified effect if this effect is interrupted.
Runs the specified effect if this effect is terminated, either because of a defect or because of interruption.
Runs the specified effect if this effect is terminated, either because of a defect or because of interruption.
Attributes
- Inherited from:
- ZIO
Returns an effect that will be executed at most once, even if it is evaluated multiple times.
Returns an effect that will be executed at most once, even if it is evaluated multiple times.
Attributes
- Inherited from:
- ZIO
Executes this effect, skipping the error but returning optionally the success.
Executes this effect, skipping the error but returning optionally the success.
Attributes
- Inherited from:
- ZIO
Translates effect failure into death of the fiber, making all failures unchecked and not a part of the type of the effect.
Translates effect failure into death of the fiber, making all failures unchecked and not a part of the type of the effect.
Attributes
- Inherited from:
- ZIO
Keeps none of the errors, and terminates the fiber with them, using the specified function to convert the E
into a Throwable
.
Keeps none of the errors, and terminates the fiber with them, using the specified function to convert the E
into a Throwable
.
Attributes
- Inherited from:
- ZIO
Executes this effect and returns its value, if it succeeds, but otherwise executes the specified effect.
Executes this effect and returns its value, if it succeeds, but otherwise executes the specified effect.
Attributes
- Inherited from:
- ZIO
Returns an effect that will produce the value of this effect, unless it fails, in which case, it will produce the value of the specified effect.
Returns an effect that will produce the value of this effect, unless it fails, in which case, it will produce the value of the specified effect.
Attributes
- Inherited from:
- ZIO
Returns an effect that will produce the value of this effect, unless it fails with the None
value, in which case it will produce the value of the specified effect.
Returns an effect that will produce the value of this effect, unless it fails with the None
value, in which case it will produce the value of the specified effect.
Attributes
- Inherited from:
- ZIO
Executes this effect and returns its value, if it succeeds, but otherwise succeeds with the specified value.
Executes this effect and returns its value, if it succeeds, but otherwise succeeds with the specified value.
Attributes
- Inherited from:
- ZIO
Exposes all parallel errors in a single call
Returns a new scoped workflow that runs finalizers added to the scope of this workflow in parallel.
Returns a new scoped workflow that runs finalizers added to the scope of this workflow in parallel.
Attributes
- Inherited from:
- ZIO
Attributes
- Inherited from:
- Product
Attributes
- Inherited from:
- Product
Attributes
- Inherited from:
- Product
Attributes
- Inherited from:
- Product
Automatically assembles a layer for the ZIO effect, which translates it to another level.
Automatically assembles a layer for the ZIO effect, which translates it to another level.
Attributes
- Inherited from:
- ZIOVersionSpecific (hidden)
Provides the ZIO
effect with its required environment, which eliminates its dependency on R
.
Provides the ZIO
effect with its required environment, which eliminates its dependency on R
.
Attributes
- Inherited from:
- ZIO
Provides a layer to the ZIO effect, which translates it to another level.
Provides a layer to the ZIO effect, which translates it to another level.
Attributes
- Inherited from:
- ZIO
Splits the environment into two parts, assembling one part using the specified layer and leaving the remainder R0
.
Splits the environment into two parts, assembling one part using the specified layer and leaving the remainder R0
.
val clockLayer: ZLayer[Any, Nothing, Clock] = ???
val zio: ZIO[Clock with Random, Nothing, Unit] = ???
val zio2 = zio.provideSome[Random](clockLayer)
Attributes
- Inherited from:
- ZIOVersionSpecific (hidden)
Transforms the environment being provided to this effect with the specified function.
Transforms the environment being provided to this effect with the specified function.
Attributes
- Inherited from:
- ZIO
Splits the environment into two parts, providing one part using the specified layer and leaving the remainder R0
.
Splits the environment into two parts, providing one part using the specified layer and leaving the remainder R0
.
val zio: ZIO[Logging with Database, Nothing, Unit] = ???
val loggingLayer: ZLayer[Any, Nothing, Logging] = ???
val zio2 = zio.provideSomeLayer[Database](loggingLayer)
Attributes
- Inherited from:
- ZIO
Returns an effect that races this effect with the specified effect, returning the first successful A
from the faster side. If one effect succeeds, the other will be interrupted. If neither succeeds, then the effect will fail with some error.
Returns an effect that races this effect with the specified effect, returning the first successful A
from the faster side. If one effect succeeds, the other will be interrupted. If neither succeeds, then the effect will fail with some error.
WARNING: The raced effect will safely interrupt the "loser", but will not resume until the loser has been cleanly terminated. If early return is desired, then instead of performing l race r
, perform l.disconnect race r.disconnect
, which disconnects left and right interrupt signal, allowing a fast return, with interruption performed in the background.
Attributes
- Inherited from:
- ZIO
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
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
Attributes
- Inherited from:
- ZIO
Returns an effect that races this effect with the specified effect, yielding the first result to succeed. If neither effect succeeds, then the composed effect will fail with some error.
Returns an effect that races this effect with the specified effect, yielding the first result to succeed. If neither effect succeeds, then the composed effect will fail with some error.
WARNING: The raced effect will safely interrupt the "loser", but will not resume until the loser has been cleanly terminated. If early return is desired, then instead of performing l raceEither r
, perform l.disconnect raceEither r.disconnect
, which disconnects left and right interrupt signal, allowing the earliest possible return.
Attributes
- Inherited from:
- ZIO
Returns an effect that races this effect with the specified effect, yielding the first result to complete, whether by success or failure. If neither effect completes, then the composed effect will not complete.
Returns an effect that races this effect with the specified effect, yielding the first result to complete, whether by success or failure. If neither effect completes, then the composed effect will not complete.
WARNING: The raced effect will safely interrupt the "loser", but will not resume until the loser has been cleanly terminated. If early return is desired, then instead of performing l raceFirst r
, perform l.disconnect raceFirst r.disconnect
, which disconnects left and right interrupt signal, allowing a fast return, with interruption performed in the background.
Attributes
- Inherited from:
- ZIO
Returns an effect that races this effect with the specified effect, calling the specified finisher as soon as one result or the other has been computed.
Returns an effect that races this effect with the specified effect, calling the specified finisher as soon as one result or the other has been computed.
Attributes
- Inherited from:
- ZIO
Keeps some of the errors, and terminates the fiber with the rest
Keeps some of the errors, and terminates the fiber with the rest, using the specified function to convert the E
into a Throwable
.
Keeps some of the errors, and terminates the fiber with the rest, using the specified function to convert the E
into a Throwable
.
Attributes
- Inherited from:
- ZIO
Fail with the returned value if the PartialFunction
matches, otherwise continue with our held value.
Fail with the returned value if the PartialFunction
matches, otherwise continue with our held value.
Attributes
- Inherited from:
- ZIO
Continue with the returned computation if the PartialFunction
matches, translating the successful match into a failure, otherwise continue with our held value.
Continue with the returned computation if the PartialFunction
matches, translating the successful match into a failure, otherwise continue with our held value.
Attributes
- Inherited from:
- ZIO
Returns a new effect that repeats this effect according to the specified schedule or until the first failure. Scheduled recurrences are in addition to the first execution, so that io.repeat(Schedule.once)
yields an effect that executes io
, and then if that succeeds, executes io
an additional time.
Returns a new effect that repeats this effect according to the specified schedule or until the first failure. Scheduled recurrences are in addition to the first execution, so that io.repeat(Schedule.once)
yields an effect that executes io
, and then if that succeeds, executes io
an additional time.
Attributes
- Inherited from:
- ZIO
Returns a new effect that repeats this effect the specified number of times or until the first failure. Repeats are in addition to the first execution, so that io.repeatN(1)
yields an effect that executes io
, and then if that succeeds, executes io
an additional time.
Returns a new effect that repeats this effect the specified number of times or until the first failure. Repeats are in addition to the first execution, so that io.repeatN(1)
yields an effect that executes io
, and then if that succeeds, executes io
an additional time.
Attributes
- Inherited from:
- ZIO
Returns a new effect that repeats this effect according to the specified schedule or until the first failure, at which point, the failure value and schedule output are passed to the specified handler.
Returns a new effect that repeats this effect according to the specified schedule or until the first failure, at which point, the failure value and schedule output are passed to the specified handler.
Scheduled recurrences are in addition to the first execution, so that io.repeat(Schedule.once)
yields an effect that executes io
, and then if that succeeds, executes io
an additional time.
Attributes
- Inherited from:
- ZIO
Returns a new effect that repeats this effect according to the specified schedule or until the first failure, at which point, the failure value and schedule output are passed to the specified handler.
Returns a new effect that repeats this effect according to the specified schedule or until the first failure, at which point, the failure value and schedule output are passed to the specified handler.
Scheduled recurrences are in addition to the first execution, so that io.repeat(Schedule.once)
yields an effect that executes io
, and then if that succeeds, executes io
an additional time.
Attributes
- Inherited from:
- ZIO
Repeats this effect until its value satisfies the specified predicate or until the first failure.
Repeats this effect until its value satisfies the specified predicate or until the first failure.
Attributes
- Inherited from:
- ZIO
Repeats this effect until its value is equal to the specified value or until the first failure.
Repeats this effect until its value is equal to the specified value or until the first failure.
Attributes
- Inherited from:
- ZIO
Repeats this effect until its value satisfies the specified effectful predicate or until the first failure.
Repeats this effect until its value satisfies the specified effectful predicate or until the first failure.
Attributes
- Inherited from:
- ZIO
Repeats this effect while its value satisfies the specified predicate or until the first failure.
Repeats this effect while its value satisfies the specified predicate or until the first failure.
Attributes
- Inherited from:
- ZIO
Repeats this effect for as long as its value is equal to the specified value or until the first failure.
Repeats this effect for as long as its value is equal to the specified value or until the first failure.
Attributes
- Inherited from:
- ZIO
Repeats this effect while its value satisfies the specified effectful predicate or until the first failure.
Repeats this effect while its value satisfies the specified effectful predicate or until the first failure.
Attributes
- Inherited from:
- ZIO
Performs this effect the specified number of times and collects the results.
Performs this effect the specified number of times and collects the results.
Attributes
- Inherited from:
- ZIO
Performs this effect the specified number of times, discarding the results.
Performs this effect the specified number of times, discarding the results.
Attributes
- Inherited from:
- ZIO
Unearth the unchecked failure of the effect. (opposite of orDie
)
Unearth the unchecked failure of the effect. (opposite of orDie
)
val f0: Task[Unit] = ZIO.fail(new Exception("failing")).unit
val f1: UIO[Unit] = f0.orDie
val f2: Task[Unit] = f1.resurrect
Attributes
- Inherited from:
- ZIO
Retries with the specified retry policy. Retries are done following the failure of the original io
(up to a fixed maximum with once
or recurs
for example), so that that io.retry(Schedule.once)
means "execute io
and in case of failure, try again once".
Retries with the specified retry policy. Retries are done following the failure of the original io
(up to a fixed maximum with once
or recurs
for example), so that that io.retry(Schedule.once)
means "execute io
and in case of failure, try again once".
Attributes
- Inherited from:
- ZIO
Retries this effect the specified number of times.
Retries with the specified schedule, until it fails, and then both the value produced by the schedule together with the last error are passed to the recovery function.
Retries with the specified schedule, until it fails, and then both the value produced by the schedule together with the last error are passed to the recovery function.
Attributes
- Inherited from:
- ZIO
Returns an effect that retries this effect with the specified schedule when it fails, until the schedule is done, then both the value produced by the schedule together with the last error are passed to the specified recovery function.
Returns an effect that retries this effect with the specified schedule when it fails, until the schedule is done, then both the value produced by the schedule together with the last error are passed to the specified recovery function.
Attributes
- Inherited from:
- ZIO
Retries this effect until its error satisfies the specified predicate.
Retries this effect until its error satisfies the specified predicate.
Attributes
- Inherited from:
- ZIO
Retries this effect until its error is equal to the specified error.
Retries this effect until its error satisfies the specified effectful predicate.
Retries this effect until its error satisfies the specified effectful predicate.
Attributes
- Inherited from:
- ZIO
Retries this effect while its error satisfies the specified predicate.
Retries this effect while its error satisfies the specified predicate.
Attributes
- Inherited from:
- ZIO
Retries this effect for as long as its error is equal to the specified error.
Retries this effect for as long as its error is equal to the specified error.
Attributes
- Inherited from:
- ZIO
Retries this effect while its error satisfies the specified effectful predicate.
Retries this effect while its error satisfies the specified effectful predicate.
Attributes
- Inherited from:
- ZIO
"Zooms in" on the value in the Right
side of an Either
, moving the possibility that the value is a Left
to the error channel.
"Zooms in" on the value in the Right
side of an Either
, moving the possibility that the value is a Left
to the error channel.
Attributes
- Inherited from:
- ZIO
Performs the specified operation while "zoomed in" on the Right
case of an Either
.
Performs the specified operation while "zoomed in" on the Right
case of an Either
.
Attributes
- Inherited from:
- ZIO
Exposes the full cause of failure of this effect.
Exposes the full cause of failure of this effect.
final case class DomainError()
val veryBadIO: IO[DomainError, Unit] =
ZIO.succeed(5 / 0) *> ZIO.fail(DomainError())
val caught: IO[DomainError, Unit] =
veryBadIO.sandbox.mapError(_.untraced).catchAll {
case Cause.Die(_: ArithmeticException) =>
// Caught defect: divided by zero!
ZIO.unit
case Cause.Fail(_) =>
// Caught error: DomainError!
ZIO.unit
case cause =>
// Caught unknown defects, shouldn't recover!
ZIO.refailCause(cause)
}
Attributes
- Inherited from:
- ZIO
Companion helper to sandbox
. Allows recovery, and partial recovery, from errors and defects alike, as in:
Companion helper to sandbox
. Allows recovery, and partial recovery, from errors and defects alike, as in:
case class DomainError()
val veryBadIO: IO[DomainError, Unit] =
ZIO.succeed(5 / 0) *> ZIO.fail(DomainError())
val caught: IO[DomainError, Unit] =
veryBadIO.sandboxWith[Any, DomainError, Unit](_.catchSome {
case Cause.Die(_: ArithmeticException, _)=>
// Caught defect: divided by zero!
ZIO.succeed(0)
})
Using sandboxWith
with catchSome
is better than using io.sandbox.catchAll
with a partial match, because in the latter, if the match fails, the original defects will be lost and replaced by a MatchError
Attributes
- Inherited from:
- ZIO
Runs this effect according to the specified schedule.
Runs this effect according to the specified schedule.
See scheduleFrom for a variant that allows the schedule's decision to depend on the result of this effect.
Attributes
- Inherited from:
- ZIO
Runs this effect according to the specified schedule in a new fiber attached to the current scope.
Runs this effect according to the specified schedule in a new fiber attached to the current scope.
Attributes
- Inherited from:
- ZIO
Runs this effect according to the specified schedule starting from the specified input value.
Runs this effect according to the specified schedule starting from the specified input value.
Attributes
- Inherited from:
- ZIO
Returns a new scoped workflow that runs finalizers added to the scope of this workflow sequentially in the reverse of the order in which they were added. Note that finalizers are run sequentially by default so this only has meaning if used within a scope where finalizers are being run in parallel.
Returns a new scoped workflow that runs finalizers added to the scope of this workflow sequentially in the reverse of the order in which they were added. Note that finalizers are run sequentially by default so this only has meaning if used within a scope where finalizers are being run in parallel.
Attributes
- Inherited from:
- ZIO
Converts an option on values into an option on errors.
Extracts the optional value, or returns the given 'default'.
Extracts the optional value, or executes the effect 'default'.
Extracts the optional value, or fails with the given error 'e'.
Extracts the optional value, or fails with a java.util.NoSuchElementException
Extracts the optional value, or fails with a java.util.NoSuchElementException
Attributes
- Inherited from:
- ZIO
Perfoms the specified operation while "zoomed in" on the Some
case of an Option
.
Perfoms the specified operation while "zoomed in" on the Some
case of an Option
.
Attributes
- Inherited from:
- ZIO
Summarizes a effect by computing some value before and after execution, and then combining the values to produce a summary, together with the result of execution.
Summarizes a effect by computing some value before and after execution, and then combining the values to produce a summary, together with the result of execution.
Attributes
- Inherited from:
- ZIO
Returns an effect with the behavior of this one, but where all child fibers forked in the effect are reported to the specified supervisor.
Returns an effect with the behavior of this one, but where all child fibers forked in the effect are reported to the specified supervisor.
Attributes
- Inherited from:
- ZIO
Returns an effect that effectfully "peeks" at the success of this effect.
Returns an effect that effectfully "peeks" at the success of this effect.
readFile("data.json").tap(printLine)
Attributes
- Inherited from:
- ZIO
Returns an effect that effectfully "peeks" at the failure or success of this effect.
Returns an effect that effectfully "peeks" at the failure or success of this effect.
readFile("data.json").tapBoth(logError(_), logData(_))
Attributes
- Inherited from:
- ZIO
Returns an effect that effectually "peeks" at the defect of this effect.
Returns an effect that effectually "peeks" at the defect of this effect.
Attributes
- Inherited from:
- ZIO
Returns an effect that effectfully "peeks" at the result of this effect.
Returns an effect that effectfully "peeks" at the result of this effect.
readFile("data.json").tapEither(result => log(result.fold("Error: " + _, "Success: " + _)))
Attributes
- Inherited from:
- ZIO
Returns an effect that effectfully "peeks" at the failure of this effect.
Returns an effect that effectfully "peeks" at the failure of this effect.
readFile("data.json").tapError(logError(_))
Attributes
- Inherited from:
- ZIO
Returns an effect that effectually "peeks" at the cause of the failure of this effect.
Returns an effect that effectually "peeks" at the cause of the failure of this effect.
readFile("data.json").tapErrorCause(logCause(_))
Attributes
- Inherited from:
- ZIO
A version of tapError
that gives you the trace of the error.
Returns an effect that effectfully "peeks" at the success of this effect. If the partial function isn't defined at the input, the result is equivalent to the original effect.
Returns an effect that effectfully "peeks" at the success of this effect. If the partial function isn't defined at the input, the result is equivalent to the original effect.
readFile("data.json").tapSome {
case content if content.nonEmpty => putStrLn(content)
}
Attributes
- Inherited from:
- ZIO
Returns an effect that effectfully "peeks" at the failure of this effect. If the partial function isn't defined at the input, the result is equivalent to the original effect.
Returns an effect that effectfully "peeks" at the failure of this effect. If the partial function isn't defined at the input, the result is equivalent to the original effect.
Attributes
- Inherited from:
- ZIO
Returns a new effect that executes this one and times the execution.
A more powerful variation of timed
that allows specifying the workflow that will be used to calculate the current time.
A more powerful variation of timed
that allows specifying the workflow that will be used to calculate the current time.
Attributes
- Inherited from:
- ZIO
Returns an effect that will timeout this effect, returning None
if the timeout elapses before the effect has produced a value; and returning Some
of the produced value otherwise.
Returns an effect that will timeout this effect, returning None
if the timeout elapses before the effect has produced a value; and returning Some
of the produced value otherwise.
If the timeout elapses without producing a value, the running effect will be safely interrupted.
WARNING: The effect returned by this method will not itself return until the underlying effect is actually interrupted. This leads to more predictable resource utilization. If early return is desired, then instead of using effect.timeout(d)
, use effect.disconnect.timeout(d)
, which first disconnects the effect's interruption signal before performing the timeout, resulting in earliest possible return, before an underlying effect has been successfully interrupted.
Attributes
- Inherited from:
- ZIO
Returns an effect that will timeout this effect, returning either the default value if the timeout elapses before the effect has produced a value; and or returning the result of applying the function f
to the success value of the effect.
Returns an effect that will timeout this effect, returning either the default value if the timeout elapses before the effect has produced a value; and or returning the result of applying the function f
to the success value of the effect.
If the timeout elapses without producing a value, the running effect will be safely interrupted
ZIO.succeed(1).timeoutTo(None)(Some(_))(1.second)
Attributes
- Inherited from:
- ZIO
Attributes
- Inherited from:
- ZIOPlatformSpecific (hidden)
Attributes
- Inherited from:
- ZIOPlatformSpecific (hidden)
Converts the effect into a scala.concurrent.Future.
Converts the effect into a scala.concurrent.Future.
When this effect succeeds with a cause, then this method returns a new effect that either fails with the cause that this effect succeeded with, or succeeds with unit, depending on whether the cause is empty.
Attributes
- Inherited from:
- ZIO
Performs this effect uninterruptibly. This will prevent the effect from being terminated externally, but the effect may fail for internal reasons (e.g. an uncaught error) or terminate due to defect.
Performs this effect uninterruptibly. This will prevent the effect from being terminated externally, but the effect may fail for internal reasons (e.g. an uncaught error) or terminate due to defect.
Uninterruptible effects may recover from all failure causes (including interruption of an inner effect that has been made interruptible).
Attributes
- Inherited from:
- ZIO
Converts a ZIO[R, Either[E, B], A]
into a ZIO[R, E, Either[A, B]]
. The inverse of left
.
Converts a ZIO[R, Either[E, B], A]
into a ZIO[R, E, Either[A, B]]
. The inverse of left
.
Attributes
- Inherited from:
- ZIO
The moral equivalent of if (!p) Some(exp) else None
The moral equivalent of if (!p) { expr; () }
The moral equivalent of if (!p) Some(exp) else None
when p
has side-effects
The moral equivalent of if (!p) Some(exp) else None
when p
has side-effects
Attributes
- Inherited from:
- ZIO
The moral equivalent of if (!p) { expr; () }
when p
has side-effects
Takes some fiber failures and converts them into errors.
Takes some fiber failures and converts them into errors.
Takes some fiber failures and converts them into errors, using the specified function to convert the E
into an E1
.
Takes some fiber failures and converts them into errors, using the specified function to convert the E
into an E1
.
Attributes
- Inherited from:
- ZIO
Converts a ZIO[R, Either[B, E], A]
into a ZIO[R, E, Either[B, A]]
. The inverse of right
.
Converts a ZIO[R, Either[B, E], A]
into a ZIO[R, E, Either[B, A]]
. The inverse of right
.
Attributes
- Inherited from:
- ZIO
The inverse operation to sandbox
. Submerges the full cause of failure.
The inverse operation to sandbox
. Submerges the full cause of failure.
Attributes
- Inherited from:
- ZIO
Converts an option on errors into an option on values.
Updates a service in the environment of this effect.
Updates a service at the specified key in the environment of this effect.
Updates a service at the specified key in the environment of this effect.
Attributes
- Inherited from:
- ZIO
Sequentially zips the this result with the specified result. Combines both Cause[E1]
when both effects fail.
Sequentially zips the this result with the specified result. Combines both Cause[E1]
when both effects fail.
Attributes
- Inherited from:
- ZIO
Returns an effect that executes both this effect and the specified effect, in parallel. Combines both Cause[E1]` when both effects fail.
Returns an effect that executes both this effect and the specified effect, in parallel. Combines both Cause[E1]` when both effects fail.
Attributes
- Inherited from:
- ZIO
Sequentially zips this effect with the specified effect using the specified combiner function. Combines the causes in case both effect fail.
Sequentially zips this effect with the specified effect using the specified combiner function. Combines the causes in case both effect fail.
Attributes
- Inherited from:
- ZIO
Returns an effect that executes both this effect and the specified effect, in parallel, combining their results with the specified f
function. If both sides fail, then the cause will be combined.
Returns an effect that executes both this effect and the specified effect, in parallel, combining their results with the specified f
function. If both sides fail, then the cause will be combined.
Attributes
- Inherited from:
- ZIO
The moral equivalent of if (p) Some(exp) else None
The moral equivalent of if (p) { expr; () }
Executes this workflow when value of the specified FiberRef
satisfies the predicate.
Executes this workflow when value of the specified FiberRef
satisfies the predicate.
Attributes
- Inherited from:
- ZIO
Executes this workflow when the value of the Ref
satisfies the predicate.
Executes this workflow when the value of the Ref
satisfies the predicate.
Attributes
- Inherited from:
- ZIO
The moral equivalent of if (p) Some(exp) else None
when p
has side-effects
The moral equivalent of if (p) Some(exp) else None
when p
has side-effects
Attributes
- Inherited from:
- ZIO
The moral equivalent of if (p) { expr; () }
when p
has side-effects
Executes this workflow with the specified implementation of the clock service.
Executes this workflow with the specified implementation of the clock service.
Attributes
- Inherited from:
- ZIO
Executes this workflow with the specified configuration provider.
Executes this workflow with the specified implementation of the console service.
Executes this workflow with the specified implementation of the console service.
Attributes
- Inherited from:
- ZIO
Returns a new scoped workflow that returns the result of this workflow as well as a finalizer that can be run to close the scope of this workflow.
Returns a new scoped workflow that returns the result of this workflow as well as a finalizer that can be run to close the scope of this workflow.
Attributes
- Inherited from:
- ZIO
Treats this effect as the acquisition of a resource and adds the specified finalizer to the current scope. This effect will be run uninterruptibly and the finalizer will be run when the scope is closed.
Treats this effect as the acquisition of a resource and adds the specified finalizer to the current scope. This effect will be run uninterruptibly and the finalizer will be run when the scope is closed.
Attributes
- Inherited from:
- ZIO
A more powerful variant of withFinalizer
that allows the finalizer to depend on the Exit
value that the scope is closed with.
A more powerful variant of withFinalizer
that allows the finalizer to depend on the Exit
value that the scope is closed with.
Attributes
- Inherited from:
- ZIO
Executes this workflow with the specified logger added.
Runs this effect with the specified maximum number of fibers for parallel operators.
Runs this effect with the specified maximum number of fibers for parallel operators.
Attributes
- Inherited from:
- ZIO
Runs this effect with an unbounded maximum number of fibers for parallel operators.
Runs this effect with an unbounded maximum number of fibers for parallel operators.
Attributes
- Inherited from:
- ZIO
Executes this workflow with the specified implementation of the random service.
Executes this workflow with the specified implementation of the random service.
Attributes
- Inherited from:
- ZIO
Returns a new ZIO effect that will update the runtime flags according to the specified patch within the scope of this ZIO effect.
Returns a new ZIO effect that will update the runtime flags according to the specified patch within the scope of this ZIO effect.
Attributes
- Inherited from:
- ZIO
Executes this workflow with the specified implementation of the system service.
Executes this workflow with the specified implementation of the system service.
Attributes
- Inherited from:
- ZIO
A named alias for <*>
.
A named alias for <*
.
A named alias for <&>
.
A named alias for <&
.
A named alias for &>
.
A named alias for *>
.
Sequentially zips this effect with the specified effect using the specified combiner function.
Sequentially zips this effect with the specified effect using the specified combiner function.
Attributes
- Inherited from:
- ZIO
Returns an effect that executes both this effect and the specified effect, in parallel, combining their results with the specified f
function. If either side fails, then the other side will be interrupted.
Returns an effect that executes both this effect and the specified effect, in parallel, combining their results with the specified f
function. If either side fails, then the other side will be interrupted.
Attributes
- Inherited from:
- ZIO