Builder

class Builder<T>

Constructs references to lambdas and some basic configuration used to process results of Coroutine use case.

Constructors

Link copied to clipboard
fun Builder()

Functions

Link copied to clipboard
fun build(): CoroutineScopeOwner.UseCaseConfig<T>
Link copied to clipboard
fun disposePrevious(disposePrevious: Boolean)

Set whether currently active Job of internal Coroutine should be canceled when execute is called repeatedly. Default value is true.

Link copied to clipboard
fun onError(onError: (Throwable) -> Unit)

Set lambda that is called when exception on internal Coroutine occurs

Link copied to clipboard
fun onStart(onStart: () -> Unit)

Set lambda that is called right before the internal Coroutine is created

Link copied to clipboard
fun onSuccess(onSuccess: (T) -> Unit)

Set lambda that is called when internal Coroutine finished without exceptions