Failure

data class Failure(val exception: Throwable) : Resultat<Nothing>

This type represents a failed outcome.

Parameters

exception

The encapsulated exception value

Constructors

Link copied to clipboard
fun Failure(exception: Throwable)

Functions

Link copied to clipboard
fun exceptionOrNull(): Throwable?

Returns the encapsulated Throwable exception if this instance represents failure or null if it is success or loading.

Link copied to clipboard
inline fun getOrNull(): Nothing?

Returns the encapsulated value if this instance represents success or null if it is failure or Resultat.Loading.

Link copied to clipboard
open override fun toString(): String

Properties

Link copied to clipboard
val exception: Throwable
Link copied to clipboard
val isFailure: Boolean

Returns true if this instance represents a failed outcome. In this case isSuccess returns false. In this case isLoading returns false.

Link copied to clipboard
val isLoading: Boolean

Returns true if this instance represents a loading outcome. In this case isSuccess returns false. In this case isFailure returns false.

Link copied to clipboard
val isSuccess: Boolean

Returns true if this instance represents a successful outcome. In this case isFailure returns false. In this case isLoading returns false.