withPrecondition

fun <T : Any> Call<T>.withPrecondition(scope: CoroutineScope, precondition: suspend () -> Result<Unit>): Call<T>

Run the Call if the given precondition is Result.Success.

Parameters

scope

CoroutineScope to launch this procedure.

precondition

A given Result to decide to execute this Call.