ResourceEither

sealed class ResourceEither<out F, out S>

Inheritors

Types

Link copied to clipboard
object Companion
Link copied to clipboard
data class Failure<out F, out S>(val failure: F, val data: S? = null, val isLoading: Boolean = false) : ResourceEither<F, S>
Link copied to clipboard
data class Success<out S>(val data: S, val isLoading: Boolean = false) : ResourceEither<Nothing, S>

Properties

Link copied to clipboard
abstract val isLoading: Boolean

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>