pub struct EscalationPolicy {
pub fallbacks: Vec<String>,
pub retry_on_timeout: bool,
}Expand description
Caller-supplied policy controlling how failures are handled.
Fields§
§fallbacks: Vec<String>Ordered fallback delegate names tried after the primary fails on a retryable error. Empty means “escalate immediately”.
retry_on_timeout: boolWhether timeouts should trigger fallback attempts. Defaults to
true — a hung primary is often recoverable via a different
agent. Set false for tasks where retry cost is prohibitive.
Implementations§
Source§impl EscalationPolicy
impl EscalationPolicy
pub fn with_fallbacks<I, S>(self, names: I) -> Self
Trait Implementations§
Source§impl Clone for EscalationPolicy
impl Clone for EscalationPolicy
Source§impl Debug for EscalationPolicy
impl Debug for EscalationPolicy
Auto Trait Implementations§
impl Freeze for EscalationPolicy
impl RefUnwindSafe for EscalationPolicy
impl Send for EscalationPolicy
impl Sync for EscalationPolicy
impl Unpin for EscalationPolicy
impl UnsafeUnpin for EscalationPolicy
impl UnwindSafe for EscalationPolicy
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