pub enum ErrorRecoveryStrategy {
ExponentialBackoff {
initial_delay: Duration,
max_retries: u32,
backoff_multiplier: f64,
},
FixedInterval {
interval: Duration,
max_retries: u32,
},
Fallback {
description: String,
},
CircuitBreaker {
failure_threshold: u32,
recovery_timeout: Duration,
},
NonRecoverable,
}Expand description
Comprehensive error recovery strategies
Variants§
ExponentialBackoff
Retry with exponential backoff
Fields
FixedInterval
Retry with fixed intervals
Fields
Fallback
Fallback to alternative approach
CircuitBreaker
Circuit breaker pattern
Fields
NonRecoverable
No recovery possible
Trait Implementations§
Source§impl Clone for ErrorRecoveryStrategy
impl Clone for ErrorRecoveryStrategy
Source§fn clone(&self) -> ErrorRecoveryStrategy
fn clone(&self) -> ErrorRecoveryStrategy
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 moreAuto Trait Implementations§
impl Freeze for ErrorRecoveryStrategy
impl RefUnwindSafe for ErrorRecoveryStrategy
impl Send for ErrorRecoveryStrategy
impl Sync for ErrorRecoveryStrategy
impl Unpin for ErrorRecoveryStrategy
impl UnwindSafe for ErrorRecoveryStrategy
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