Ok

data class Ok<out V>(val value: V) : Outcome<V, Nothing>

Constructors

Link copied to clipboard
constructor(value: V)

Properties

Link copied to clipboard
val value: V

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