CompletableObserver

Represents an Observer of Completable source. See Observer and CompletableCallbacks for more information.

Functions

Link copied to clipboard
abstract fun onComplete()

Notifies the host (typically an Observer) about completion

Link copied to clipboard
abstract fun onError(error: Throwable)

Called when there is an exception occurred

Link copied to clipboard
abstract fun onSubscribe(disposable: Disposable)

Provides the Observer with a Disposable. This method must be called before any other methods.

Link copied to clipboard
inline fun ErrorCallback.tryCatch(errorTransformer: (Throwable) -> Throwable = { it }, block: () -> Unit)
inline fun <T> ErrorCallback.tryCatch(block: () -> T, errorTransformer: (Throwable) -> Throwable = { it }, onSuccess: (T) -> Unit)