Utilities for RxJava 2.x.
Coroutine builders:
Name | Result | Scope | Description |
---|---|---|---|
rxCompletable | [Completable][io.reactivex.Completable] | CoroutineScope | Cold completable that starts coroutine on subscribe |
rxSingle | [Single][io.reactivex.Single] | CoroutineScope | Cold single that starts coroutine on subscribe |
rxObservable | [Observable][io.reactivex.Observable] | ProducerScope | Cold observable that starts coroutine on subscribe |
Suspending extension functions and suspending iteration:
Name | Description |
---|---|
CompletableSource.await | Awaits for completion of the completable value |
SingleSource.await | Awaits for completion of the single value and returns it |
ObservableSource.awaitFirst | Awaits for the first value from the given observable |
ObservableSource.awaitLast | Awaits for the last value from the given observable |
ObservableSource.awaitSingle | Awaits for the single value from the given observable |
ObservableSource.open | Subscribes to observable and returns ReceiveChannel |
ObservableSource.iterator | Subscribes to observable and returns ChannelIterator |
Note, that [Flowable][io.reactivex.Flowable] is a subclass of Reactive Streams [Publisher][org.reactivestreams.Publisher] and extensions for it are covered by kotlinx-coroutines-reactive module.
Conversion functions:
Name | Description |
---|---|
Job.toCompletable | Converts job to hot completable |
Deferred.toSingle | Converts deferred value to hot single |
ReceiveChannel.toObservable | Converts streaming channel to hot observable |
Utilities for RxJava 2.x.