#[non_exhaustive]pub enum EscalationReason {
WafBlocked {
vendor: String,
},
SoftBlock,
RenderNeeded,
OriginUnreliable,
AntibotEscalate,
}Expand description
Why the dispatcher should escalate to the next tier.
§Examples
let waf_block = EscalationReason::WafBlocked {
vendor: "cloudflare".to_string(),
};
let soft_block = EscalationReason::SoftBlock;
let render = EscalationReason::RenderNeeded;
let unreliable = EscalationReason::OriginUnreliable;
match waf_block {
EscalationReason::WafBlocked { vendor } => println!("Blocked by {}", vendor),
EscalationReason::SoftBlock => println!("Soft block detected"),
EscalationReason::RenderNeeded => println!("JS render needed"),
EscalationReason::OriginUnreliable => println!("Origin unreachable"),
// `#[non_exhaustive]`: callers outside the crate must include a wildcard
// so future variants do not break their match.
_ => println!("unknown reason"),
}Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
WafBlocked
WAF or bot protection detected the request.
SoftBlock
200 with low content density — likely a soft block.
RenderNeeded
200 but body is a SPA shell that needs JS render.
OriginUnreliable
Sustained 5xx; origin probably unreachable, escalate anyway.
AntibotEscalate
Antibot strategy hook returned crate::types::Decision::EscalateBrowser.
Trait Implementations§
Source§impl Clone for EscalationReason
impl Clone for EscalationReason
Source§fn clone(&self) -> EscalationReason
fn clone(&self) -> EscalationReason
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 moreSource§impl Debug for EscalationReason
impl Debug for EscalationReason
Source§impl<'de> Deserialize<'de> for EscalationReason
impl<'de> Deserialize<'de> for EscalationReason
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
impl Eq for EscalationReason
Source§impl PartialEq for EscalationReason
impl PartialEq for EscalationReason
Source§impl Serialize for EscalationReason
impl Serialize for EscalationReason
impl StructuralPartialEq for EscalationReason
Auto Trait Implementations§
impl Freeze for EscalationReason
impl RefUnwindSafe for EscalationReason
impl Send for EscalationReason
impl Sync for EscalationReason
impl Unpin for EscalationReason
impl UnsafeUnpin for EscalationReason
impl UnwindSafe for EscalationReason
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.