Failure

data class Failure<E : Throwable>(val error: E) : Either<Nothing, E> (source)

Constructors

Link copied to clipboard
constructor(error: E)

Properties

Link copied to clipboard
val error: E

Functions

Link copied to clipboard
fun <T, Out, E : Throwable> Either<T, E>.flatMap(transform: (T) -> Either<Out, E>): Either<Out, E>
Link copied to clipboard
inline suspend fun <T, E : Throwable> Either<T, E>.fold(crossinline onSuccess: suspend (T) -> Unit, crossinline onFailure: suspend (E) -> Unit)
Link copied to clipboard
Link copied to clipboard
fun getThrowable(): E?
Link copied to clipboard
inline suspend fun <T, E : Throwable> Either<T, E>.into(crossinline map: suspend (Either<T, E>) -> Either<T, E>): Either<T, E>
Link copied to clipboard
fun <In, Out, E : Throwable> Either<In, E>.map(transform: (In) -> Out): Either<Out, E>
Link copied to clipboard
suspend fun <In, Out, E : Throwable> Either<In, E>.mapAsync(transform: suspend (In) -> Out): Either<Out, E>
Link copied to clipboard
fun <T, E : Throwable, F : Throwable> Either<T, E>.mapError(transform: (E) -> F): Either<T, *>
Link copied to clipboard
fun <T, E : Throwable> Either<T, E>.onError(onError: (E) -> Unit): Either<T, E>
Link copied to clipboard
suspend fun <T, E : Throwable> Either<T, E>.onErrorAsync(onError: suspend (E) -> Unit): Either<T, E>
Link copied to clipboard
suspend fun <In, E : Throwable> Either<In, E>.then(then: suspend (In) -> Unit): Either<In, E>
Link copied to clipboard
inline fun <T, E : Throwable> Either<T, E>.toResult(): Result<T>
Link copied to clipboard
fun <T> Either<T, out Throwable>.unwrap(): T