-
-
Save skydoves/edc5c76faa3a2b9f2343c87304990fa1 to your computer and use it in GitHub Desktop.
network_result_sealed_class
This file contains 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 NetworkResult<T : Any> { | |
class Success<T: Any>(val data: T) : NetworkResult<T>() | |
class Error<T: Any>(val code: Int, val message: String?) : NetworkResult<T>() | |
class Exception<T: Any>(val e: Throwable) : NetworkResult<T>() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment