Package com.skydoves.retrofit.adapters.result

Types

Link copied to clipboard
class ResultCallAdapterFactory : CallAdapter.Factory

Functions

Link copied to clipboard
inline suspend fun <R, T> Result<T>.foldSuspend(crossinline onSuccess: suspend (value: T) -> R, crossinline onFailure: suspend (exception: Throwable) -> R): R
Link copied to clipboard
inline suspend fun <R, T> Result<T>.mapSuspend(crossinline transform: suspend (value: T) -> R): Result<R>
Link copied to clipboard
inline suspend fun <T> Result<T>.onFailureSuspend(crossinline action: suspend (exception: Throwable) -> Unit): Result<T>
Link copied to clipboard
inline suspend fun <T, E> Result<T>.onFailureSuspendAsError(crossinline action: suspend (errorModel: E?) -> Unit): Result<T>
Link copied to clipboard
inline suspend fun <T> Result<T>.onSuccessSuspend(crossinline action: suspend (value: T) -> Unit): Result<T>
Link copied to clipboard
inline suspend fun <R, T : R> Result<T>.recoverSuspend(crossinline transform: suspend (exception: Throwable) -> R): Result<R>
Link copied to clipboard
inline suspend fun <R> runCatchingSuspend(crossinline block: suspend () -> R): Result<R>
inline suspend fun <T, R> T.runCatchingSuspend(crossinline block: suspend T.() -> R): Result<R>