opensavvy.state.progressive¶
The ProgressiveOutcome, which combines Outcome with Progress.
Types¶
ProgressiveOutcome¶
sealed class ProgressiveOutcome<out Failure, out Value>
Properties¶
Functions¶
combineCompleted¶
fun <Failure, Value> Iterable<ProgressiveOutcome<Failure, Value>>.combineCompleted(): Iterable<ProgressiveOutcome<Failure, Value>>
Replaces incomplete outcomes by the previous completed outcome, with the updated progress information.
fun <Failure, Value> Sequence<ProgressiveOutcome<Failure, Value>>.combineCompleted(): Sequence<ProgressiveOutcome<Failure, Value>>
Replaces incomplete outcomes by the previous completed outcome, with the updated progress information.
failedWithProgress¶
fun <Failure> Failure.failedWithProgress(progress: Progress = done()): ProgressiveOutcome.Failure<Failure>
Convenience function to instantiate a ProgressiveOutcome.Failure.
flatten¶
@ExperimentalProgressApi
fun <Failure, Value> Progressive<Outcome<Failure, Value>>.flatten(): ProgressiveOutcome<Failure, Value>
Converts an Outcome nested in a Progressive into a ProgressiveOutcome.
successfulWithProgress¶
fun <Value> Value.successfulWithProgress(progress: Progress = done()): ProgressiveOutcome.Success<Value>
Convenience function to instantiate a ProgressiveOutcome.Success.
withProgress¶
fun <Failure, Value> Outcome<Failure, Value>.withProgress(progress: Progress = done()): ProgressiveOutcome<Failure, Value>
Adds progress information to this outcome to make it a ProgressiveOutcome.