Home

Awesome

RxResult

Version License Platform

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.

Usage

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)

Requirements

Installation

RxResult is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "RxResult"

License

RxResult is available under the MIT license. See the LICENSE file for more info.