Success

data class Success<out S, out F : Throwable>(val value: S) : Result<S, F>

Constructors

Link copied to clipboard
constructor(value: S)

Properties

Link copied to clipboard
Link copied to clipboard
val value: S

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>