Error

data class Error<out E : Error>(val error: E, val message: String? = null, val data: Any? = null) : Result<Nothing, E>

Constructors

Link copied to clipboard
constructor(error: E, message: String? = null, data: Any? = null)

Properties

Link copied to clipboard
val data: Any? = null
Link copied to clipboard
val error: E
Link copied to clipboard
val message: String? = null

Functions

Link copied to clipboard
Link copied to clipboard
inline fun <T, E : Error, R> Result<T, E>.map(map: (T) -> R): Result<R, E>
Link copied to clipboard
inline fun <T, E : Error> Result<T, E>.onError(action: (E) -> Unit): Result<T, E>
Link copied to clipboard
inline fun <T, E : Error> Result<T, E>.onSuccess(action: (T) -> Unit): Result<T, E>