Failure
data class Failure(val code: POFailure.Code, val message: String? = null, val invalidFields: List<POFailure.InvalidField>? = null, val cause: Exception? = null) : ProcessOutResult<Nothing>
Provides detailed information about an error that occurred.
Constructors
Link copied to clipboard
constructor(code: POFailure.Code, message: String? = null, invalidFields: List<POFailure.InvalidField>? = null, cause: Exception? = null)
Functions
Link copied to clipboard
Returns the unmodified copy of the result.
Link copied to clipboard
inline fun <T : Any> ProcessOutResult<T>.handleFailure(block: (code: POFailure.Code, message: String?, invalidFields: List<POFailure.InvalidField>?, cause: Exception?) -> Unit)
Link copied to clipboard
Link copied to clipboard
inline fun <T : Any> ProcessOutResult<T>.onFailure(action: (failure: ProcessOutResult.Failure) -> Unit): ProcessOutResult<T>
Performs the given action on the encapsulated failure if this instance represents Failure. Returns the original ProcessOutResult unchanged.
Link copied to clipboard
Performs the given action on the encapsulated value if this instance represents Success. Returns the original ProcessOutResult unchanged.
Link copied to clipboard
Maps ProcessOutResult to parcelable ProcessOutActivityResult.