Error

data class Error(val kException: KaliumException) : NetworkResponse<Nothing>

Constructors

Link copied to clipboard
constructor(kException: KaliumException)

Properties

Link copied to clipboard

Functions

Link copied to clipboard
internal inline fun <T : Any, R : Any> NetworkResponse<T>.flatMap(fn: (NetworkResponse.Success<T>) -> NetworkResponse<R>): NetworkResponse<R>
Link copied to clipboard
fun <T : Any> NetworkResponse<T>.isSuccessful(): Boolean
Link copied to clipboard
internal inline fun <T : Any, U : Any> NetworkResponse<T>.mapSuccess(mapping: (T) -> U): NetworkResponse<U>

If the request is successful, perform mapping and create a new Success with its result

Link copied to clipboard
internal inline fun <T : Any> NetworkResponse<T>.onFailure(fn: (NetworkResponse.Error) -> Unit): NetworkResponse<T>
Link copied to clipboard
internal inline fun <T : Any> NetworkResponse<T>.onSuccess(fn: (NetworkResponse.Success<T>) -> Unit): NetworkResponse<T>