KeypleResult

sealed class KeypleResult<out T>

KeypleResult wraps the result of a Keyple operation. It can be either a Success or a Failure. In case of a Failure, we provide the error status and message but also the data provided by the server. It's up to your business logic to decide what to do with it.

Parameters

T

The type of the data associated with the result, so it can be deserialized for you. It is a convention between your keyple server and your client app.

Inheritors

Types

Link copied to clipboard
data class Failure<T>(val status: Status, val message: String, val data: T? = null) : KeypleResult<T>
Link copied to clipboard
data class Success<T>(val data: T) : KeypleResult<T>