Created
January 3, 2020 19:13
-
-
Save anibalbastiass/915d92724cfac3ffa21a68d00d0096fe to your computer and use it in GitHub Desktop.
Result.kt
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<T> { | |
data class OnSuccess<T>( val value: T) : Result<T>() | |
data class OnError<T>(val throwable: Throwable) : Result<T>() | |
class OnLoading<T> : Result<T>() | |
class OnCancel<T> : Result<T>() | |
class OnEmpty<T> : Result<T>() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment