1 unstable release

0.1.0 Apr 19, 2024

#237 in WebAssembly

Download history 26920/week @ 2024-09-19 24570/week @ 2024-09-26 32461/week @ 2024-10-03 30121/week @ 2024-10-10 31514/week @ 2024-10-17 32913/week @ 2024-10-24 39244/week @ 2024-10-31 34105/week @ 2024-11-07 28262/week @ 2024-11-14 26898/week @ 2024-11-21 25089/week @ 2024-11-28 29195/week @ 2024-12-05 27054/week @ 2024-12-12 12146/week @ 2024-12-19 7120/week @ 2024-12-26 18356/week @ 2025-01-02

70,007 downloads per month
Used in 8 crates (2 directly)

MIT license

18KB
397 lines

finito

This library provides retry mechanisms to retry async operations.

It's based off tokio-retry with the difference that it isn't coupled to any specific async runtime and that it compiles for WASM.

Examples

use finito::{Retry, ExponentialBackoff};

async fn action() -> Result<u64, ()> {
    // do some real-world stuff here...
    Err(())
}

#[tokio::main]
async fn main() -> Result<(), ()> {
    let retry_strategy = ExponentialBackoff::from_millis(10).take(3);    // limit to 3 retries

    let result = Retry::new(retry_strategy, action).await?;

    Ok(())
}

lib.rs:

finito provides retry mechanisms to retry async operations.

It's based off tokio-retry with the difference that it isn't coupled to any specific async runtime and that it compiles for WASM.

Dependencies

~0.3–1MB
~19K SLoC