Created
August 10, 2017 15:41
-
-
Save ncreated/b9a55fe902cd9844df3b2249a1cf99c6 to your computer and use it in GitHub Desktop.
Medium blogpost snippet
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
| enum ToggleValue { | |
| /// Initial value read from storage | |
| case initial(Bool) | |
| /// Updated value after successfully saving in storage | |
| case updated(Bool) | |
| /// Fallback value after unsuccessfully saving in storage | |
| case fallback(Bool) | |
| /// Unknown if failed reading the initial value | |
| case unknown(Error) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment