TestsTested | ✗ |
LangLanguage | SwiftSwift |
License | MIT |
ReleasedLast Release | Nov 2017 |
SwiftSwift Version | 3.0 |
SPMSupports SPM | ✗ |
Maintained by Ivan Bruel.
Depends on: | |
RxSwift | ~> 4.0 |
Result | >= 0 |
RxResult provides helpful methods to manage Observable
RxSwift streams with Result
values. Allowing you to subscribe only to success or failure cases, but also calling doOn
methods on top of it.
let result: Observable<Result<String, JSONError>> = ...
result.doOnSuccess { value in
print("success with \(value)")
}.doOnFailure { error in
print("failure with \(error)")
}.subscribeSuccess { value in // or subscribeFailure
print("subscribed with success \(value)")
}.addDisposableTo(disposeBag)
RxResult is available through CocoaPods. To install
it, simply add the following line to your Podfile:
pod "RxResult"
RxResult is available under the MIT license. See the LICENSE file for more info.