retryResult


Description:

public T retryResult<T> (owned RetryResultFunc<T> fn)

Retries nullable callback until non-null value or attempts exhausted.

Example:

    string? token = retry.retryResult<string?> (() => {
return maybe_fetch_token ();
});

Parameters:

fn

callback to run.

Returns:

non-null value on success, null on failure.