Created
June 29, 2019 20:57
-
-
Save psteiger/21a5be4bcfc8609f96a3838bb89a9e57 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> { | |
data class Success<out T>(val data: T) : Resource<T>() | |
data class Loading<out T>(val partialData: T? = null) : Resource<T>() | |
data class Failure<out T>(val throwable: Throwable? = null) : Resource<T>() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment