pub struct RecoveryPolicy {
pub max_attempts: NonZeroU32,
pub base_delay: Duration,
pub delay_ceiling: Duration,
pub retryable_statuses: BTreeSet<u16>,
pub retryable_categories: BTreeSet<Category>,
pub budget: Option<Duration>,
pub deadline: Option<Instant>,
pub timing: Arc<dyn Timing>,
pub admission: Option<Arc<dyn Admission>>,
pub observer: Option<Arc<dyn LifecycleObserver>>,
pub wire_observer: Option<Arc<dyn WireObserver>>,
}Fields§
§max_attempts: NonZeroU32§base_delay: Duration§delay_ceiling: Duration§retryable_statuses: BTreeSet<u16>§retryable_categories: BTreeSet<Category>Protocol and provider-response errors remain ineligible without a proven provider policy.
budget: Option<Duration>§deadline: Option<Instant>§timing: Arc<dyn Timing>§admission: Option<Arc<dyn Admission>>§observer: Option<Arc<dyn LifecycleObserver>>§wire_observer: Option<Arc<dyn WireObserver>>Implementations§
Source§impl RecoveryPolicy
impl RecoveryPolicy
Sourcepub fn validate(&self) -> Result<(), RecoveryPolicyError>
pub fn validate(&self) -> Result<(), RecoveryPolicyError>
Validate options before creating a recovery gateway.
§Errors
Returns a concrete policy error for non-error HTTP statuses or categories without a supported recovery policy. Permanent statuses remain ineligible even when explicitly selected.
Trait Implementations§
Source§impl Clone for RecoveryPolicy
impl Clone for RecoveryPolicy
Source§fn clone(&self) -> RecoveryPolicy
fn clone(&self) -> RecoveryPolicy
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 moreAuto Trait Implementations§
impl !RefUnwindSafe for RecoveryPolicy
impl !UnwindSafe for RecoveryPolicy
impl Freeze for RecoveryPolicy
impl Send for RecoveryPolicy
impl Sync for RecoveryPolicy
impl Unpin for RecoveryPolicy
impl UnsafeUnpin for RecoveryPolicy
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