Created
February 23, 2018 18:59
-
-
Save IsaAliev/d5448ceea02a39ad70baa4c0b3e48bc6 to your computer and use it in GitHub Desktop.
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 Foundation | |
typealias JSON = [String: Any] | |
enum Result<T> { | |
case Value(T) | |
case Error(ErrorRepresentable) | |
case None | |
} | |
protocol ResponseHandler { | |
associatedtype ResultValueType | |
func handleResponse(_ response: ResponseRepresentable, completion: (Result<ResultValueType>) -> ()) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment