RetryStrategy

Trait RetryStrategy 

Source
pub trait RetryStrategy: Send + Sync {
    // Required methods
    fn should_retry(&self, attempt: u32, error: &SyncError) -> bool;
    fn delay_before_retry(&self, attempt: u32) -> Duration;
    fn max_attempts(&self) -> u32;
}
Expand description

重试策略 trait

Required Methods§

Source

fn should_retry(&self, attempt: u32, error: &SyncError) -> bool

Source

fn delay_before_retry(&self, attempt: u32) -> Duration

Source

fn max_attempts(&self) -> u32

Implementors§