Crate fuchsia_backoff

Source

Traits§

Backoff
A backoff policy for deciding to retry an operation.
Task
A task produces an asynchronous computation that can be retried if the returned future fails with some error.

Functions§

retry_or_collect_errors
Execute the async task. If it errs out, attempt to run the task again after a delay if the backoff yields a duration. Otherwise, collect all the errors and return them to the caller.
retry_or_first_error
Execute the async task. If it errs out, attempt to run the task again after a delay if the backoff yields a duration. Otherwise, return the first error that occurred to the caller.
retry_or_last_error
Execute the async task. If it errs out, attempt to run the task again after a delay if the backoff yields a duration. Otherwise, return the last error that occurred to the caller.