Skip to main content

RetrySettings

Trait RetrySettings 

Source
pub trait RetrySettings {
    // Required methods
    fn rate_limit_per_min(&self) -> u32;
    fn max_retries(&self) -> u32;
    fn backoff_base(&self) -> Duration;
}
Expand description

Throttle/retry knobs a Fetcher needs, supplied by each vendor SyncConfig.

Required Methods§

Source

fn rate_limit_per_min(&self) -> u32

Max requests per minute (0 = no throttle).

Source

fn max_retries(&self) -> u32

Retries per request on a retryable error before giving up.

Source

fn backoff_base(&self) -> Duration

Base backoff; the Nth retry waits base * 2^(N-1).

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§