Response

@Serializable
sealed class Response<T>

Inheritors

Types

Link copied to clipboard
@Serializable
@SerialName(value = "false")
data class Failure(val errorCode: Int, val description: String? = null, val parameters: ResponseParameters? = null) : Response<Nothing>
Link copied to clipboard
@Serializable
@SerialName(value = "true")
data class Success<T>(val result: T) : Response<T>

Properties

Link copied to clipboard
val ok: Boolean

Functions

Link copied to clipboard
fun <T> Response<T>.getOrNull(): T?
Link copied to clipboard
Link copied to clipboard
inline fun <T> Response<T>.onFailure(block: (Response.Failure) -> Unit): T?