-
-
Save GuilhE/06522e57b67e097af18a8bd3cb052be6 to your computer and use it in GitHub Desktop.
Medium article - UserStatus
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 UserStatus<out T : Any> { | |
class Success(val data: UserData) : UserStatus<UserData>() | |
object NoAccount : UserStatus<Unit>() | |
sealed class Error(val e: Exception) : UserStatus<Nothing>() { | |
class Generic(e: Exception) : Error(e) | |
class Error1(e: Exception) : Error(e) | |
class Error2(e: Exception) : Error(e) | |
class Error3(e: Exception) : Error(e) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment