Failure

class Failure<out E : Any>(val error: Exception) : SippoService<E>

Failed result with error error.

Parameters

E

Type of the error. It has to extend Exception.

Constructors

Link copied to clipboard
constructor(error: Exception)

Properties

Link copied to clipboard

Functions

Link copied to clipboard
open override fun error(): Exception

Returns the error associated. In case of Success, error will be null.

Link copied to clipboard

Calls the function f with a specific error when Either is failure.

Link copied to clipboard
fun <V : Any> SippoService<V>.success(f: (V) -> Unit)

Calls the function f with a specific value when SippoService is successful.

Link copied to clipboard
open override fun value(): E?

Returns the value associated. In case of Failure, value will be null.