Failure

data class Failure : WebcomResult<Nothing>

Represents a failed computation with an error that originated the failure.

Functions

get
Link copied to clipboard
open override fun get(): Nothing

Gets the result of computation when successful, throws otherwise.

getOrElse
Link copied to clipboard
open override fun getOrElse(default: @UnsafeVariance Nothing): Nothing

Gets the result of the computation when successful, or a given default value otherwise.

getOrNull
Link copied to clipboard
open override fun getOrNull(): Nothing?

Gets the result of the computation when successful, or null otherwise.

isSuccess
Link copied to clipboard
open override fun isSuccess(): Boolean

Indicates whether the computation was successful.

map
Link copied to clipboard
open override fun <U> map(f: (Nothing) -> U): WebcomResult<U>

Maps the result of this computation using the given f function.

Properties

error
Link copied to clipboard
val error: WebcomError

Error that made the computation fail.

failureError
Link copied to clipboard
open override val failureError: WebcomError?

Gets the error of computation when failed, or null otherwise.