on

inline fun on(crossinline predicate: PredicateFunction): RetryPredicate

Returns a RetryPredicate that mirrors the result of the given predicate. It will allow retries when the predicate returns false.

Return

a RetryPredicate that mirrors the result of the predicate.

Since

1.0.0

Parameters

predicate

a lambda expression that takes a Result and an Int (retry count) as parameters and returns a Boolean.