Skip to content

Instantly share code, notes, and snippets.

@GuilhE
Last active Jan 26, 2021
Embed
What would you like to do?
Medium article - UserStatus
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