Skip to content

Instantly share code, notes, and snippets.

@Ahmedgadein
Created March 21, 2022 11:43
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Ahmedgadein/1981e8078e3120f99ca2c1516511e76e to your computer and use it in GitHub Desktop.
Save Ahmedgadein/1981e8078e3120f99ca2c1516511e76e to your computer and use it in GitHub Desktop.
sealed class Result<out T>{
object Loading(): Result<Nothing>()
class Success<T>(val value: T): Result<T>()
class Error(val message:String): Result<Nothing>()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment