Success

data class Success<out S>(val data: S, val code: Int, val headers: Headers) : NetworkEither<Nothing, S>

Constructors

Link copied to clipboard
constructor(data: S, code: Int, headers: Headers)

Properties

Link copied to clipboard
val code: Int
Link copied to clipboard
val data: S
Link copied to clipboard

Functions

Link copied to clipboard
inline fun <A> fold(failure: () -> A, success: (S) -> A): A
inline fun <A> fold(httpFailure: (NetworkEither.Failure.Http<Nothing>) -> A, localFailure: () -> A, remoteFailure: () -> A, unknownFailure: (Throwable) -> A, success: (NetworkEither.Success<S>) -> A): A
Link copied to clipboard
@JvmName(name = "getCode1")
fun getCode(): Int
Link copied to clipboard
Link copied to clipboard
fun getSuccess(): S
Link copied to clipboard
Link copied to clipboard
@JvmName(name = "getThrowable1")
fun getThrowable(): Throwable
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun ifFailureLocal(block: () -> Unit)
Link copied to clipboard
fun ifFailureRemote(block: () -> Unit)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <L, R> toEither(crossinline httpFailure: (NetworkEither.Failure.Http<Nothing>) -> L, localFailure: () -> L, remoteFailure: () -> L, crossinline unknownFailure: (Throwable) -> L, crossinline success: (NetworkEither.Success<S>) -> R): Either<L, R>