data class Success<out V> : Result<V, Nothing>
Operation was successful and return a associated value of type V
value - associated to the sucessful operation
Success(value: V)
Operation was successful and return a associated value of type V |
val value: V
associated to the sucessful operation |
val isError: Boolean
Returns true if the result is a failure |
|
val isSuccess: Boolean
Returns true if the result is a success |
fun getErrorOrNull(): E?
Returns the associated exception error of type E if operation encountered a failure, otherwise null |
|
fun getOrThrow(): V
Returns the associated value of type V if operation was successful, otherwise throws the failure exception |
|
fun getValueOrNull(): V?
Returns the associated value of type V if operation was successful, otherwise null |