Package-level declarations
Types
Exception representing unsatisfied condition when using errorIf
An exception that is thrown when an attempt to retrieve a result of an ApiResult is being made when the result is Loading
Functions
Catches Exceptions only and rethrows kotlin.Throwables (like kotlin.Errors).
Makes this an error if the collection is empty.
Maps every item of this using transform
Maps each success value of this flow using transform
Invokes block each time this flow emits an ApiResult.Success value
Invokes block each time this flow emits an ApiResult.Success value
Recover from an exception of type R, else no-op. Does not affect Loading.
Recover from an exception. Does not affect Loading See also the typed version of this function to recover from a specific exception type
Alias for errorOnNull
Run block with a given context, catching any exceptions both in the block and nested coroutines. block will not return until all nested launched coroutines, if any, return. For the other type of behavior, use ApiResult.invoke directly. A failure of a child does not cause the scope to fail and does not affect its other children. A failure of the scope itself (exception thrown in the block or external cancellation) fails the result with all its children, but does not cancel parent job.