AtpResponse

sealed class AtpResponse<T : Any>

A sealed type representing the result of performing an XRPC operation.

Inheritors

Types

Link copied to clipboard
data class Failure<T : Any>(val statusCode: StatusCode, val response: T?, val error: AtpErrorDescription?, val headers: Map<String, String>) : AtpResponse<T>

A failed XRPC operation that may have returned a valid response, valid error description, or neither.

Link copied to clipboard
data class Success<T : Any>(val response: T, val headers: Map<String, String>) : AtpResponse<T>

A successful XRPC operation that returned a valid response.

Functions

Link copied to clipboard
fun <R : Any> map(transform: (T) -> R): AtpResponse<R>
Link copied to clipboard
Link copied to clipboard