madruga 0.1.3

Retry resiliente com backoff.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#[macro_export]
macro_rules! madruga_retry {
    ($strategy:expr, || $op:expr) => {
        $crate::retry::retry_async($strategy, |_| $op())
    };

    ($strategy:expr, || async $body:block) => {
        $crate::retry::retry_async($strategy, |_| async $body)
    };

    ($strategy:expr, |$attempt:ident| $op:expr) => {
        $crate::retry::retry_async($strategy, |$attempt| $op)
    };

    ($strategy:expr, |$attempt:ident| async $body:block) => {
        $crate::retry::retry_async($strategy, |$attempt| async $body)
    };
}