pub struct OperationRetryConfig {
pub initial_backoff: Duration,
pub max_backoff: Duration,
pub max_retries: Option<u32>,
}Expand description
Configuration for lookup, partition-metadata, producer-open, and subscribe retries.
Fields§
§initial_backoff: DurationInitial delay before the first re-issue.
max_backoff: DurationMaximum delay between re-issues.
max_retries: Option<u32>Maximum re-issues after the initial attempt.
Some(0) disables retries. None removes the count cap, but runtime
engines still stop at the enclosing operation deadline.
Implementations§
Source§impl OperationRetryConfig
impl OperationRetryConfig
Sourcepub fn should_retry_after_failure(&self, failures: u32) -> bool
pub fn should_retry_after_failure(&self, failures: u32) -> bool
Whether a broker failure numbered failures should schedule a re-issue.
failures is one-based: the first failed attempt passes 1.
Sourcepub fn delay_after_failure(&self, failures: u32) -> Duration
pub fn delay_after_failure(&self, failures: u32) -> Duration
Delay for the one-based failed-attempt number.
Trait Implementations§
Source§impl Clone for OperationRetryConfig
impl Clone for OperationRetryConfig
Source§fn clone(&self) -> OperationRetryConfig
fn clone(&self) -> OperationRetryConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 OperationRetryConfig
impl Debug for OperationRetryConfig
Source§impl Default for OperationRetryConfig
impl Default for OperationRetryConfig
Source§fn default() -> OperationRetryConfig
fn default() -> OperationRetryConfig
Returns the “default value” for a type. Read more
impl Eq for OperationRetryConfig
Source§impl PartialEq for OperationRetryConfig
impl PartialEq for OperationRetryConfig
impl StructuralPartialEq for OperationRetryConfig
Auto Trait Implementations§
impl Freeze for OperationRetryConfig
impl RefUnwindSafe for OperationRetryConfig
impl Send for OperationRetryConfig
impl Sync for OperationRetryConfig
impl Unpin for OperationRetryConfig
impl UnsafeUnpin for OperationRetryConfig
impl UnwindSafe for OperationRetryConfig
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