Result

value class Result<out T, out E>(unboxed: Any?)

Constructors

Link copied to clipboard
constructor(unboxed: Any?)

Types

Link copied to clipboard
object Companion
Link copied to clipboard
class Failure(val error: Any?)

Properties

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun errorOrNull(): E?
Link copied to clipboard
inline fun <R> fold(onSuccess: (T) -> R, onError: (E) -> R): R
Link copied to clipboard
fun getOrNull(): T?
Link copied to clipboard
fun getOrThrow(): T
Link copied to clipboard
inline fun <R> map(transform: (T) -> R): Result<R, E>
Link copied to clipboard
inline fun <R> mapError(transform: (E) -> R): Result<T, R>
Link copied to clipboard
inline fun onError(action: (E) -> Unit): Result<T, E>
Link copied to clipboard
inline fun onSuccess(action: (T) -> Unit): Result<T, E>
Link copied to clipboard
open override fun toString(): String