SingleCallbacks

Callbacks for Single source. See Single, SuccessCallback and ErrorCallback for more information.

Inheritors

Functions

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

Called when there is an exception occurred

Link copied to clipboard
abstract fun onSuccess(value: T)

Notifies the host (typically an Observer) about completion with a value

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)