Success

data class Success<out T : Any>(val value: T) : ApiResult<T>

Success!

Parameters

value

resulting desired data

Constructors

Link copied to clipboard
constructor(value: T)

Properties

Link copied to clipboard
val value: T

Functions

Link copied to clipboard
inline fun <T : Any> ApiResult<T>.getOrNull(): T?
Link copied to clipboard
inline fun <R : Any, T : Any> ApiResult<T>.map(transform: (value: T) -> R?): ApiResult<R>
Link copied to clipboard
inline fun <T : Any> ApiResult<T>.onError(block: (Throwable) -> Unit): ApiResult<T>
Link copied to clipboard
inline fun <T : Any> ApiResult<T>.onSuccess(block: (T) -> Unit): ApiResult<T>