Rx Observable TypesThu Oct 01 2020
Types
Observable
- Returns multiple responses. It uses onNext()
and onError()
Single
- Only ever returns one response. This can either be an onSuccess()
or onError()
. Either way a response is only called once where in the subscription is disposed.
Maybe
- Either returns one response or no responses. It behaves the same as a Single
except it could never return.
Docs
I've been using this in the context of RxSwift, but it holds true across Rx implementations.