Result

open class Result<V, E>

Abstract operation result

Parameters

<V>

type of returned value

<E>

type of errors.

Functions

Link copied to clipboard
open fun <V, E> failure(@NonNull error: E): Result<V, E>
Link copied to clipboard
open fun getError(): E
Link copied to clipboard
open fun getValue(): V
Link copied to clipboard
open fun isFailure(): Boolean
Returns true if result has no value and false otherwise
Link copied to clipboard
open fun isSuccess(): Boolean
Returns true if result has the value and false otherwise
Link copied to clipboard
open fun <V, E> success(@NonNull value: V): Result<V, E>
Link copied to clipboard
open fun toString(): String

Extensions

Link copied to clipboard
fun <S, F> Result<S, F>.toSealedResult(): SealedResult<S, F>