corda / net.corda.core / rx.Observable

Extensions for rx.Observable


fun <ELEMENT> Observable<ELEMENT>.mapErrors(transform: (Throwable) -> Throwable): Observable<ELEMENT>

Returns an Observable that transforms errors according to the provided transform function.


fun <T> Observable<T>.toFuture(): CordaFuture<T>

Returns a CordaFuture bound to the first item emitted by this Observable. The future will complete with a NoSuchElementException if no items are emitted or any other error thrown by the Observable. If it's cancelled then it will unsubscribe from the observable.