Result

value class Result<out T, out E>

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val failure: E
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val success: T
Link copied to clipboard

Functions

Link copied to clipboard
inline fun <T1, T2, E> Result<T1, E>.flatMap(block: (T1) -> Result<T2, E>): Result<T2, E>
Link copied to clipboard
fun <T, E> Result<Result<T, E>, E>.flatten(): Result<T, E>
Link copied to clipboard
fun <E> Result<*, E>.getFailureOr(default: E): E
inline fun <T, E> Result<T, E>.getFailureOr(block: (T) -> E): E
Link copied to clipboard
fun <T> Result<T, *>.getOr(default: T): T
inline fun <T, E> Result<T, E>.getOr(block: (E) -> T): T
Link copied to clipboard
fun <T, E : Throwable> Result<T, E>.getOrThrow(): T
Link copied to clipboard
inline fun <T1, T2, E> Result<T1, E>.map(block: (T1) -> T2): Result<T2, E>
Link copied to clipboard
inline fun <T, E1, E2> Result<T, E1>.mapError(block: (E1) -> E2): Result<T, E2>
Link copied to clipboard
open override fun toString(): String