Result

sealed class Result<out V, out E>

Inheritors

Types

Link copied to clipboard
data class Err<out E>(val error: E) : Result<Nothing, E>
Link copied to clipboard
data class Ok<out V>(val value: V) : Result<V, Nothing>

Functions

Link copied to clipboard
fun errorOrNull(): E?
Link copied to clipboard
inline fun expect(message: () -> String): V
fun expect(message: String): V
Link copied to clipboard
inline fun expectErr(message: () -> String): E
Link copied to clipboard
fun getOrNull(): V?
Link copied to clipboard
fun <V, E> Result<V, E>.toInternalResult(): Result<V, E>
Link copied to clipboard
fun unwrap(): V
Link copied to clipboard
fun unwrapErr(): E