pub struct InterstitialPolicy {
pub queue_interval: Duration,
pub queue_max_retries: u32,
pub challenge_solve_budget: Duration,
pub hard_block_escalation: StrategyUsed,
pub transient_follow_redirect: bool,
pub max_transient_hops: u32,
pub short_circuit_on_classified: bool,
}Expand description
Routing tunables for InterstitialRouter.
All fields have safe defaults that the production
acquisition path uses unchanged. Callers can override
any field via the with_* builders.
§Example
use stygian_browser::interstitial_router::InterstitialPolicy;
use std::time::Duration;
let policy = InterstitialPolicy {
queue_interval: Duration::from_secs(10),
..InterstitialPolicy::default()
};
assert_eq!(policy.queue_interval, Duration::from_secs(10));
assert!(policy.short_circuit_on_classified);Fields§
§queue_interval: DurationWait interval between queue retries.
queue_max_retries: u32Maximum retries for a queue page.
challenge_solve_budget: DurationChallenge solve budget.
hard_block_escalation: StrategyUsedStrategy to escalate to on a hard block.
transient_follow_redirect: boolWhether to follow redirects on a transient page.
max_transient_hops: u32Maximum redirect hops to follow on a transient page.
short_circuit_on_classified: boolWhen true (default), a non-Transient
classification short-circuits the runner with a
structured
StageFailureKind::InterstitialRouted
failure so the calling layer can route via the
dedicated strategy. When false, the decision is
only attached to the result — the runner still
executes the strategy ladder.
Implementations§
Source§impl InterstitialPolicy
impl InterstitialPolicy
Sourcepub const fn with_queue_interval(self, interval: Duration) -> Self
pub const fn with_queue_interval(self, interval: Duration) -> Self
Build a policy with an explicit queue interval.
Sourcepub const fn with_queue_max_retries(self, max_retries: u32) -> Self
pub const fn with_queue_max_retries(self, max_retries: u32) -> Self
Build a policy with an explicit max retries value.
Sourcepub const fn with_challenge_solve_budget(self, budget: Duration) -> Self
pub const fn with_challenge_solve_budget(self, budget: Duration) -> Self
Build a policy with an explicit challenge solve budget.
Sourcepub const fn with_hard_block_escalation(self, strategy: StrategyUsed) -> Self
pub const fn with_hard_block_escalation(self, strategy: StrategyUsed) -> Self
Build a policy with an explicit hard-block escalation strategy.
Sourcepub const fn with_transient_follow_redirect(self, follow: bool) -> Self
pub const fn with_transient_follow_redirect(self, follow: bool) -> Self
Build a policy with an explicit follow-redirect flag.
Sourcepub const fn with_max_transient_hops(self, max_hops: u32) -> Self
pub const fn with_max_transient_hops(self, max_hops: u32) -> Self
Build a policy with an explicit max-hops value.
Sourcepub const fn with_short_circuit(self, short_circuit: bool) -> Self
pub const fn with_short_circuit(self, short_circuit: bool) -> Self
Build a policy with an explicit short-circuit flag.
Trait Implementations§
Source§impl Clone for InterstitialPolicy
impl Clone for InterstitialPolicy
Source§fn clone(&self) -> InterstitialPolicy
fn clone(&self) -> InterstitialPolicy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more