Error

data class Error<out E>(val error: E) : Outcome<Nothing, E>

Constructors

Link copied to clipboard
constructor(error: E)

Properties

Link copied to clipboard
val error: E

Functions

Link copied to clipboard
suspend fun <T : JsAny?> Outcome<IDBRequest<T>, Any>.await(): Outcome<T, Any>
Link copied to clipboard
inline fun <T, E> Outcome<T, E>.runOnError(block: (E) -> Unit): Outcome<T, E>
Link copied to clipboard
inline fun <T, E> Outcome<T, E>.runOnOk(block: (T) -> Unit): Outcome<T, E>
Link copied to clipboard
fun <V, E> Outcome<V, E>.unwrapOrDefault(default: V): V
Link copied to clipboard
fun <V, E> Outcome<V, E>.unwrapOrNull(): V?
Link copied to clipboard
inline fun <T, E> Outcome<T, E>.unwrapOrReturn(block: (Outcome.Error<E>) -> Nothing): T