Skip to main content

RetryPolicy

Trait RetryPolicy 

Source
pub trait RetryPolicy: Send + Sync {
    // Required method
    fn should_retry(&self, attempt: u32, error: &SDKError) -> Option<u64>;
}
Expand description

Represents a strategy for retrying failed requests.

Required Methods§

Source

fn should_retry(&self, attempt: u32, error: &SDKError) -> Option<u64>

Determines whether a request should be retried based on the error. If it should be retried, returns the delay in milliseconds.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§