pub struct HttpRetryOptions {
pub enabled: bool,
pub max_attempts: u32,
pub max_duration: Option<Duration>,
pub delay_strategy: Delay,
pub jitter_factor: f64,
pub method_policy: HttpRetryMethodPolicy,
}Expand description
Retry settings for crate::HttpClient.
Fields§
§enabled: boolWhether built-in retry is enabled.
max_attempts: u32Maximum number of attempts, including the first request.
max_duration: Option<Duration>Optional maximum total retry duration.
delay_strategy: DelayDelay strategy between attempts.
jitter_factor: f64Jitter factor passed to the retry delay strategy.
method_policy: HttpRetryMethodPolicyMethod replay policy.
Implementations§
Source§impl HttpRetryOptions
impl HttpRetryOptions
Sourcepub fn from_config<R>(config: &R) -> Result<Self, HttpConfigError>where
R: ConfigReader + ?Sized,
pub fn from_config<R>(config: &R) -> Result<Self, HttpConfigError>where
R: ConfigReader + ?Sized,
Creates HttpRetryOptions from config using relative keys.
§Parameters
config: AnyConfigReaderscoped to the retry section.
§Returns
Parsed retry options or HttpConfigError.
Sourcepub fn validate(&self) -> Result<(), HttpConfigError>
pub fn validate(&self) -> Result<(), HttpConfigError>
Trait Implementations§
Source§impl Clone for HttpRetryOptions
impl Clone for HttpRetryOptions
Source§fn clone(&self) -> HttpRetryOptions
fn clone(&self) -> HttpRetryOptions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HttpRetryOptions
impl Debug for HttpRetryOptions
Source§impl Default for HttpRetryOptions
impl Default for HttpRetryOptions
Source§impl PartialEq for HttpRetryOptions
impl PartialEq for HttpRetryOptions
impl StructuralPartialEq for HttpRetryOptions
Auto Trait Implementations§
impl Freeze for HttpRetryOptions
impl RefUnwindSafe for HttpRetryOptions
impl Send for HttpRetryOptions
impl Sync for HttpRetryOptions
impl Unpin for HttpRetryOptions
impl UnsafeUnpin for HttpRetryOptions
impl UnwindSafe for HttpRetryOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more