Skip to main content

Crate mukoumizu

Crate mukoumizu 

Source
Expand description

A small, dependency-free retry toolkit for synchronous Rust code.

mukoumizu retries fallible operations with configurable exponential backoff, bounded jitter, selective retrying, and retry notifications.

§Example

use mukoumizu::Retry;
use std::time::Duration;

let mut calls = 0;
let value = Retry::new(4)
    .initial_delay(Duration::ZERO)
    .run(|| {
        calls += 1;
        if calls < 3 { Err("not yet") } else { Ok(42) }
    })
    .unwrap();

assert_eq!(value, 42);
assert_eq!(calls, 3);

Structs§

Retry
Configuration for retrying a synchronous operation.
RetryError
The final failure returned by a retry operation.