Disposable in let request = MyAPI.get(url, ( (result, error) -> { if let err = error { observer.onError(err); } else if let authResponse = result { observer.onNext(authResponse); observer.onComplete(); } }) return AnonymousDisposable { request.cancel() }
(intValue) -> Void in // Pumped out an int }, onError: { (error) -> Void in // ERROR! }, onCompleted: { () -> Void in // There are no more signals }) { () -> Void in // We disposed this subscription }