Failure

data class Failure<out F, out S>(val failure: F, val data: S? = null, val isLoading: Boolean = false) : ResourceEither<F, S>

Constructors

Link copied to clipboard
constructor(failure: F, data: S? = null, isLoading: Boolean = false)

Properties

Link copied to clipboard
val data: S? = null
Link copied to clipboard
val failure: F
Link copied to clipboard
open override val isLoading: Boolean = false

Functions

Link copied to clipboard
inline fun <A> fold(failure: (ResourceEither.Failure<F, S>) -> A, success: (ResourceEither.Success<S>) -> A): A
Link copied to clipboard
inline fun ifFailure(block: (ResourceEither.Failure<F, S>) -> Unit)
Link copied to clipboard
inline fun ifSuccess(block: (ResourceEither.Success<S>) -> Unit)
Link copied to clipboard
Link copied to clipboard
@JvmName(name = "getIsLoading")
fun isLoading(): Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <L, R> toEither(failure: (ResourceEither.Failure<F, S>) -> L, success: (ResourceEither.Success<S>) -> R): Either<L, R>