Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
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