Result

sealed class Result<out S, out F : Throwable>

Inheritors

Types

Link copied to clipboard
data class Failure<out S, out F : Throwable>(val failure: F) : Result<S, F>
Link copied to clipboard
data class Success<out S, out F : Throwable>(val value: S) : Result<S, F>

Properties

Link copied to clipboard

Functions

Link copied to clipboard
inline fun <T> flatMap(transform: (value: S) -> Result<T, @UnsafeVariance 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>
Link copied to clipboard
open override fun toString(): String