Companion

object Companion

Companion object for Resultat class that contains its constructor functions success, loading and failure.

Functions

Link copied to clipboard
inline fun <T> failure(exception: Throwable): Resultat<T>

Returns an instance that encapsulates the given Throwable as failure.

Link copied to clipboard
inline fun <T> loading(): Resultat<T>

Returns an instance that represents the loading state.

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

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