getOrElse

inline fun <T> ChannelResult<T>.getOrElse(onFailure: (exception: Throwable?) -> T): T(source)

Returns the encapsulated value if this instance represents success or the result of onFailure function for the encapsulated Throwable exception if it is failed or closed result.