Last active
August 11, 2020 16:23
-
-
Save lowellk/ec9fa704bb2c927e49ba183a080b843d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sealed class Result<out T> { | |
object Idle : Result<Nothing>() | |
object Loading : Result<Nothing>() | |
data class Error(val error: Throwable) : Result<Nothing>() | |
data class Success<T>(val data: T) : Result<T>() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment