CSResult
data class CSResult<Value>(val state: CSResult.State, val value: Value? = null, var throwable: Throwable? = null, var message: String? = null, val code: Int? = null)
An operation result whose State.Cancel is a domain outcome returned while the caller remains active. Coroutine cancellation is control flow and propagates instead of becoming a result.
Constructors
Types
Functions
Link copied to clipboard
Link copied to clipboard
inline suspend fun ifNotSuccess(dispatcher: CoroutineContext?, crossinline function: suspend () -> Unit): CSResult<Value>
Link copied to clipboard
inline suspend fun <T> ifSuccessReturn(crossinline function: suspend (Value) -> CSResult<T>): CSResult<T>
inline suspend fun <T> ifSuccessReturn(dispatcher: CoroutineContext?, crossinline function: suspend (Value) -> CSResult<T>): CSResult<T>
Link copied to clipboard
inline suspend fun <T> ifSuccessSuccess(dispatcher: CoroutineContext?, crossinline function: suspend (Value) -> T): CSResult<T>