Created
December 21, 2019 15:54
-
-
Save gastsail/562cad0ec0e9abbf8dc113231537878d 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 Resource<out T> { | |
class Loading<out T> : Resource<T>() | |
data class Success<out T>(val data: T) : Resource<T>() | |
data class Failure<out T>(val throwable: Throwable) : Resource<T>() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment