Failure

data class Failure : WebcomResult<Nothing>

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

Functions

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

Gets the result of computation when successful, throws otherwise.

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.

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

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

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

Indicates whether the computation was successful.

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

Link copied to clipboard
val error: WebcomError

Error that made the computation fail.

Link copied to clipboard
open override val failureError: WebcomError

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