Created
April 13, 2021 14:59
-
-
Save shredderskelton/2468a4486a2ae44e20d1c2698ffe2847 to your computer and use it in GitHub Desktop.
Result
This file contains hidden or 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 MyResult<T> { | |
| sealed class Success<T>(val data: T) : MyResult<T>() { | |
| class Network<T>(data: T) : Success<T>(data) | |
| class Cache<T>(data: T) : Success<T>(data) | |
| } | |
| data class Failure<T>(val error: String) : MyResult<T>() | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment