v1.0.0
Upgrade
Since 1.0.0, backon Retry doesn't take a reference of builder anymore:
+ your_fn.retry(ExponentialBuilder::default()).await;
- your_fn.retry(&ExponentialBuilder::default()).await;
Since version 0.5.0, backon no longer directly depends on tokio
. Instead, users can now provide their own sleep implementation.
For example:
use anyhow::Result;
use backon::ExponentialBuilder;
use backon::Retryable;
use std::future::ready;
async fn main() -> Result<()> {
let content = fetch
.retry(&ExponentialBuilder::default())
.sleep(tokio::time::sleep)
.await?;
Ok(())
}
To maintain the same behavior as before, please enable the tokio-sleep
feature.
What's Changed
- fix: Expose struct out to generate API docs by @Xuanwo in #102
- refactor: Move all backoff in one mod by @Xuanwo in #103
- refactor: Take ownership of builder instead by @Xuanwo in #104
- docs: Re-position of backon by @Xuanwo in #106
- docs: Add a logo for backon by @Xuanwo in #107
- docs: Polish vision and docs by @Xuanwo in #108
- docs: Refactor examples by @Xuanwo in #109
- chore: Establish MSRV as 1.70 by @Xuanwo in #110
- Bump to version 1.0 by @Xuanwo in #111
Full Changelog: v0.5.0...v1.0.0