pub struct ReplayDefenseContext {
pub policy: ReplayDefensePolicy,
pub state: ReplayDefenseState,
}Expand description
Replay-defense context supplied to an AcquisitionRequest.
Carries the ReplayDefensePolicy (which determines the
rotation / nonce / drift levers) and the live
ReplayDefenseState (the per-session record) into the runner.
When the context is set, the runner evaluates the policy
before any stage executes and, if the decision requires a
forced refresh, calls
BrowserPool::release_context
to invalidate the sticky session for the target host before
short-circuiting with a structured
StageFailureKind::Setup failure.
Fields§
§policy: ReplayDefensePolicyPolicy to apply to the supplied state.
state: ReplayDefenseStatePer-session record to evaluate.
Implementations§
Source§impl ReplayDefenseContext
impl ReplayDefenseContext
Sourcepub fn new(state: ReplayDefenseState) -> Self
pub fn new(state: ReplayDefenseState) -> Self
Build a context with the default policy.
Sourcepub const fn with_policy(
policy: ReplayDefensePolicy,
state: ReplayDefenseState,
) -> Self
pub const fn with_policy( policy: ReplayDefensePolicy, state: ReplayDefenseState, ) -> Self
Build a context with the supplied policy and state.
Trait Implementations§
Source§impl Clone for ReplayDefenseContext
impl Clone for ReplayDefenseContext
Source§fn clone(&self) -> ReplayDefenseContext
fn clone(&self) -> ReplayDefenseContext
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 moreAuto Trait Implementations§
impl Freeze for ReplayDefenseContext
impl RefUnwindSafe for ReplayDefenseContext
impl Send for ReplayDefenseContext
impl Sync for ReplayDefenseContext
impl Unpin for ReplayDefenseContext
impl UnsafeUnpin for ReplayDefenseContext
impl UnwindSafe for ReplayDefenseContext
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