A goal of any operation should be a successful outcome. This crate gives operations a better chance at achieving that.
📦 install
In your Cargo.toml file, add the following under the [dependencies]
heading
= "0.1"
🤸usage
For very simple cases you can use the module level retry
function
to retry a potentially fallible operation.
use Error;
async
You may not want to retry every kind of error. For preciseness you can be more explicit in which kinds of errors should be retried with the module level retry_if
function.
use Error;
async
You can also customize retry behavior to suit your applications needs
with a configurable and reusable RetryPolicy
.
use Error;
use Duration;
use RetryPolicy;
async
See the docs for more examples.
Doug Tangren (softprops) 2020