Failure

data class Failure<out S, out F : Throwable>(val failure: F) : Result<S, F>

Constructors

Link copied to clipboard
constructor(failure: F)

Properties

Link copied to clipboard
val failure: F
Link copied to clipboard

Functions

Link copied to clipboard
inline fun <T> flatMap(transform: (value: S) -> Result<T, F>): Result<T, F>
Link copied to clipboard
inline fun fold(onSuccess: (S) -> Unit, onFailure: (F) -> Unit)
Link copied to clipboard
fun getOrNull(): S?
Link copied to clipboard
fun getOrThrow(): S
Link copied to clipboard
inline fun <T> map(transform: (value: S) -> T): Result<T, F>