ApiResult

sealed class ApiResult<out T>

man this aged well

Inheritors

Types

Link copied to clipboard
data class ApiError(val responseCode: Int, val errorBody: ResponseBody?) : ApiResult<Nothing>
Link copied to clipboard
data class Error(val throwable: Throwable) : ApiResult<Nothing>
Link copied to clipboard
data object Idle : ApiResult<Nothing>
Link copied to clipboard
data object Loading : ApiResult<Nothing>
Link copied to clipboard
data class Success<T>(val value: T) : ApiResult<T>

Properties

Link copied to clipboard
Link copied to clipboard
val <T> ApiResult<T>.getAsApiResponseBody: ResponseBody?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <T> ApiResult<T>.onApiError(function: (errorBody: ResponseBody?, responseCode: Int) -> Unit): ApiResult<T>
Link copied to clipboard
inline fun <T> ApiResult<T>.onApiErrorOrError(function: () -> Unit): ApiResult<T>
Link copied to clipboard
suspend fun <T> ApiResult<T>.onApiErrorSuspend(function: suspend (errorBody: ResponseBody?, responseCode: Int) -> Unit): ApiResult<T>
Link copied to clipboard
inline fun <T> ApiResult<T>.onError(function: (throwable: Throwable) -> Unit): ApiResult<T>
Link copied to clipboard
suspend fun <T> ApiResult<T>.onErrorSuspend(function: suspend (throwable: Throwable) -> Unit): ApiResult<T>
Link copied to clipboard
inline fun <T> ApiResult<T>.onIdle(function: () -> Unit): ApiResult<T>
Link copied to clipboard
suspend fun <T> ApiResult<T>.onIdleSuspend(function: suspend () -> Unit): ApiResult<T>
Link copied to clipboard
inline fun <T> ApiResult<T>.onLoading(function: () -> Unit): ApiResult<T>
Link copied to clipboard
suspend fun <T> ApiResult<T>.onLoadingSuspend(function: suspend () -> Unit): ApiResult<T>
Link copied to clipboard
inline fun <T> ApiResult<T>.onSuccess(function: (model: T) -> Unit): ApiResult<T>
Link copied to clipboard
suspend fun <T> ApiResult<T>.onSuccessSuspend(function: suspend (model: T) -> Unit): ApiResult<T>
Link copied to clipboard
Link copied to clipboard