Last active
August 14, 2022 11:09
-
-
Save Askeri-Muhendis/9d3eaf1de9d5574df96fccbc2cb5595e to your computer and use it in GitHub Desktop.
sealed_model
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 Resource<T>{ | |
class Success<T>(val data : T) : Resource<T>() | |
class Error<T>(val errorCode : Int,val errorMessage : String) : Resource<T>() | |
class Exception<T>(val exception : Throwable) : Resource<T>() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment