Failure

The latest known result of the operation was a failure, available as failure.

If progress is loading, this means the operation has been retried in an attempt to access a more up-to-date version.

Constructors

Link copied to clipboard
constructor(failure: Failure, progress: Progress = done())

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Returns Failure.failure, or null if this outcome is not a failure.

Link copied to clipboard
open override val progress: Progress

The current progression of this outcome.

Link copied to clipboard

The progression of this unsuccessful value.

Link copied to clipboard
Link copied to clipboard

Returns Success.value, or null if this outcome is not successful.

Functions

Link copied to clipboard

Converts this progressive outcome into a regular outcome.

Link copied to clipboard
Link copied to clipboard
operator fun ProgressiveOutcome<*, *>.component2(): Progress

Syntax sugar for ProgressiveOutcome.progress.

Link copied to clipboard

Replaces the progress information from this progressive outcome.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <Failure> ProgressiveOutcome<Failure, *>.onFailure(block: (Failure) -> Unit)

Executes block if this outcome is a failure.

Link copied to clipboard
inline fun ProgressiveOutcome<*, *>.onIncomplete(block: () -> Unit)

Executes block if this outcome is incomplete.

Link copied to clipboard
inline fun ProgressiveOutcome<*, *>.onLoading(block: (Progress.Loading) -> Unit)

Executes block if this outcome is loading (its ProgressiveOutcome.progress is Progress.Loading).

Link copied to clipboard
inline fun <Value> ProgressiveOutcome<*, Value>.onSuccess(block: (Value) -> Unit)

Executes block if this outcome is successful.

Link copied to clipboard
Link copied to clipboard