Companion

object Companion

Functions

Link copied to clipboard
fun <T> error(errorMessage: String): SwitchboardResult<T>

Creates a failed result holding the given error message.

Link copied to clipboard
inline fun <T> fromJson(jsonResponse: String): SwitchboardResult<T>

Parses a typed result from a JSON response returned by the native layer.

Link copied to clipboard

Parses a simple success-or-error JSON response that carries no value.

Link copied to clipboard
fun <T> success(value: T): SwitchboardResult<T>

Creates a successful result holding the given value.