ResultEvent

Types

Link copied to clipboard
object Companion
Link copied to clipboard
data class ErrorEvent(val t: Throwable) : ResultEvent
Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard
suspend fun <R> flatMapSuspend(fn: (Unit) -> ResultObject<R>): ResultObject<R>
Link copied to clipboard
Link copied to clipboard
fun getOrNull(): Unit?

return value or null

Link copied to clipboard

return value or exception

Link copied to clipboard
open override fun isError(): Boolean
Link copied to clipboard
open override fun isSuccess(): Boolean
Link copied to clipboard
fun <R> map(mapper: (Unit) -> R): ResultObject<R>

Right-biased map() FP convention which means that Right is assumed to be the default case to operate on. If it is Left, operations like map, flatMap, ... return the Left value unchanged.