ApiResult

sealed class ApiResult<out T, out E : Any>

Types

Link copied to clipboard
object Companion
Link copied to clipboard
sealed class Failure<out E : Any> : ApiResult<Nothing, E>
Link copied to clipboard
data class Success<T> : ApiResult<T, Nothing>

Functions

Link copied to clipboard
fun getSuccessData(): T

Get the data from a Success result. Throws if this result is a Failure

Link copied to clipboard
fun getSuccessDataOrNull(): T?

Get the data from a Success result, or null if this result is a Failure

Link copied to clipboard
fun isSuccess(): Boolean

Is this result a Success

Inheritors

Link copied to clipboard
Link copied to clipboard