pub struct RetryHandler { /* private fields */ }Expand description
Manages retry state and computes backoff delays.
Implementations§
Source§impl RetryHandler
impl RetryHandler
Sourcepub fn new(config: RetryConfig) -> Self
pub fn new(config: RetryConfig) -> Self
Create a new retry handler from config.
Sourcepub fn should_retry(&mut self, error_msg: &str) -> Option<Duration>
pub fn should_retry(&mut self, error_msg: &str) -> Option<Duration>
Check if we should retry the given error.
Returns Some(delay) if retryable, None if fatal or max retries exceeded.
Auto Trait Implementations§
impl Freeze for RetryHandler
impl RefUnwindSafe for RetryHandler
impl Send for RetryHandler
impl Sync for RetryHandler
impl Unpin for RetryHandler
impl UnsafeUnpin for RetryHandler
impl UnwindSafe for RetryHandler
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