Last active
October 8, 2016 02:46
-
-
Save yota345/254e0937f806cb2dcfa94f7659042e8e to your computer and use it in GitHub Desktop.
ApiResponse.swift (https://github.com/takuwan0405/RxSwiftSample)
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
import RxSwift | |
import Himotoki | |
/** | |
API通信の状態を表現 | |
- .Stopped: API通信をまだ行っていない状態 | |
- .Requesting: API通信中 | |
- .Error(ErrorType): API通信でエラーが返ってきた状態 | |
- .Response(Decodable?): API通信でencode済みレスポンスを受け取っている | |
*/ | |
enum RequestState { | |
case Stopped | |
case Requesting | |
case Error(ErrorType) | |
case Response(Decodable?) | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment