Companion

object Companion

Companion object for Result class that contains its constructor functions success and failure.

Functions

Link copied to clipboard

Returns an instance that encapsulates the given PubNubException as failure.

fun <T> failure(exception: Throwable): Result<T>
Link copied to clipboard
fun <T> success(value: T): Result<T>

Returns an instance that encapsulates the given value as successful value.