tree: 6626a9487db3bd6ed171a1d6b83b158020e6d76a [path history] [tgz]
  1. src/
  2. test/
  3. build.gradle
  4. package.list
  5. README.md
reactive/kotlinx-coroutines-rx2/README.md

Module kotlinx-coroutines-rx2

Utilities for RxJava 2.x.

Coroutine builders:

NameResultScopeDescription
rxCompletableCompletableCoroutineScopeCold completable that starts coroutine on subscribe
rxMaybeMaybeCoroutineScopeCold maybe that starts coroutine on subscribe
rxSingleSingleCoroutineScopeCold single that starts coroutine on subscribe
rxObservableObservableProducerScopeCold observable that starts coroutine on subscribe
rxFlowableFlowableProducerScopeCold observable that starts coroutine on subscribe with backpressure support

Suspending extension functions and suspending iteration:

NameDescription
CompletableSource.awaitAwaits for completion of the completable value
MaybeSource.awaitAwaits for the value of the maybe and returns it or null
MaybeSource.awaitOrDefaultAwaits for the value of the maybe and returns it or default
MaybeSource.openSubscriptionSubscribes to maybe and returns ReceiveChannel
SingleSource.awaitAwaits for completion of the single value and returns it
ObservableSource.awaitFirstAwaits for the first value from the given observable
ObservableSource.awaitFirstOrDefaultAwaits for the first value from the given observable or default
ObservableSource.awaitFirstOrElseAwaits for the first value from the given observable or default from a function
ObservableSource.awaitFirstOrNullAwaits for the first value from the given observable or null
ObservableSource.awaitLastAwaits for the last value from the given observable
ObservableSource.awaitSingleAwaits for the single value from the given observable
ObservableSource.openSubscriptionSubscribes to observable and returns ReceiveChannel

Note that Flowable is a subclass of Reactive Streams Publisher and extensions for it are covered by kotlinx-coroutines-reactive module.

Conversion functions:

NameDescription
Job.asCompletableConverts job to hot completable
Deferred.asSingleConverts deferred value to hot single
ReceiveChannel.asObservableConverts streaming channel to hot observable
Scheduler.asCoroutineDispatcherConverts scheduler to CoroutineDispatcher

Package kotlinx.coroutines.rx2

Utilities for RxJava 2.x.