Skip to content

Instantly share code, notes, and snippets.

@yota345
Last active October 8, 2016 02:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yota345/254e0937f806cb2dcfa94f7659042e8e to your computer and use it in GitHub Desktop.
Save yota345/254e0937f806cb2dcfa94f7659042e8e to your computer and use it in GitHub Desktop.
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