pub enum EscalationStrategy {
Capped {
ceiling: AcquisitionModeHint,
},
Linear {
steps: Vec<AcquisitionModeHint>,
},
}Expand description
Escalation ladder the runner should climb on transient failure.
The runner walks the ladder top-to-bottom; the first stage
that returns a non-error result wins. Capped collapses the
ladder into a single-mode ceiling so the runner only retries at
the original mode plus the listed neighbours.
§Example
use stygian_charon::playbooks::EscalationStrategy;
use stygian_charon::acquisition::AcquisitionModeHint;
let capped = EscalationStrategy::Capped {
ceiling: AcquisitionModeHint::Hostile,
};
let linear = EscalationStrategy::Linear {
steps: vec![AcquisitionModeHint::Fast, AcquisitionModeHint::Hostile],
};
assert_eq!(capped.ceiling(), AcquisitionModeHint::Hostile);
assert_eq!(linear.stages(), vec![AcquisitionModeHint::Fast, AcquisitionModeHint::Hostile]);Variants§
Capped
A single ceiling mode — the runner may escalate up to (and including) the ceiling mode but not beyond.
Fields
§
ceiling: AcquisitionModeHintUpper bound on the runner’s mode escalation.
Linear
An explicit ordered list of stages the runner walks.
Fields
§
steps: Vec<AcquisitionModeHint>Ordered escalation stages (top-to-bottom).
Implementations§
Source§impl EscalationStrategy
impl EscalationStrategy
Sourcepub fn ceiling(&self) -> AcquisitionModeHint
pub fn ceiling(&self) -> AcquisitionModeHint
Upper bound the runner may escalate to.
Sourcepub fn first(&self) -> AcquisitionModeHint
pub fn first(&self) -> AcquisitionModeHint
First stage the runner attempts.
Sourcepub fn stages(&self) -> Vec<AcquisitionModeHint>
pub fn stages(&self) -> Vec<AcquisitionModeHint>
Ordered list of stages the runner walks (deduplicated, order preserved).
Trait Implementations§
Source§impl Clone for EscalationStrategy
impl Clone for EscalationStrategy
Source§fn clone(&self) -> EscalationStrategy
fn clone(&self) -> EscalationStrategy
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 moreSource§impl Debug for EscalationStrategy
impl Debug for EscalationStrategy
Source§impl Default for EscalationStrategy
impl Default for EscalationStrategy
Source§impl<'de> Deserialize<'de> for EscalationStrategy
impl<'de> Deserialize<'de> for EscalationStrategy
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for EscalationStrategy
impl PartialEq for EscalationStrategy
Source§impl Serialize for EscalationStrategy
impl Serialize for EscalationStrategy
impl Eq for EscalationStrategy
impl StructuralPartialEq for EscalationStrategy
Auto Trait Implementations§
impl Freeze for EscalationStrategy
impl RefUnwindSafe for EscalationStrategy
impl Send for EscalationStrategy
impl Sync for EscalationStrategy
impl Unpin for EscalationStrategy
impl UnsafeUnpin for EscalationStrategy
impl UnwindSafe for EscalationStrategy
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.