1 unstable release

0.1.0 Apr 19, 2024

#287 in WebAssembly

Download history 27447/week @ 2024-11-16 28518/week @ 2024-11-23 21553/week @ 2024-11-30 33054/week @ 2024-12-07 22938/week @ 2024-12-14 7323/week @ 2024-12-21 11606/week @ 2024-12-28 21357/week @ 2025-01-04 34384/week @ 2025-01-11 29853/week @ 2025-01-18 26943/week @ 2025-01-25 30906/week @ 2025-02-01 31649/week @ 2025-02-08 35600/week @ 2025-02-15 28252/week @ 2025-02-22 27341/week @ 2025-03-01

128,695 downloads per month
Used in 20 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