Failure
Functions
Link copied to clipboard
Failure component for destructuring declaration
Link copied to clipboard
Success component for destructuring declaration
Link copied to clipboard
Runs the Failure.error, if the KResult is a failure or null
otherwise
Link copied to clipboard
Runs the Success.value, if the KResult is a success or null
otherwise
Link copied to clipboard
If a KResult has a Throwable on failure side, this either returns the Success.value or throws the Failure.error
Link copied to clipboard
Link copied to clipboard
inline fun <E, T> MultiErrorKResult<E, T>.validate(failureValue: E, expectationFn: (success: T) -> Boolean): MultiErrorKResult<E, T>
Validates a Success or a FailureWithValue against a predicate (expectationFn] and applies failureValue if not fulfilled