pub enum ReplayDefenseDecision {
Valid,
RotationDue {
reason: Box<ReplayDefenseReason>,
},
NonceExpired {
reason: Box<ReplayDefenseReason>,
},
NonceRotated {
reason: Box<ReplayDefenseReason>,
},
DomainMismatch {
reason: Box<ReplayDefenseReason>,
},
SignatureDrift {
reason: Box<ReplayDefenseReason>,
},
}Expand description
Decision produced by check.
The variants are tagged by their machine-readable
outcome field so the same JSON shape used by
crate::freshness::FreshnessDecision is preserved
for downstream automation.
Variants§
Valid
Session is still valid for the observed context.
RotationDue
Elapsed since capture exceeded the rotation interval.
Fields
reason: Box<ReplayDefenseReason>Structured invalidation reason.
NonceExpired
Session nonce age exceeded the validity window.
Fields
reason: Box<ReplayDefenseReason>Structured invalidation reason.
NonceRotated
Session nonce was rotated server-side.
Fields
reason: Box<ReplayDefenseReason>Structured invalidation reason.
DomainMismatch
Observed domain did not match the state’s bound domain.
Fields
reason: Box<ReplayDefenseReason>Structured invalidation reason.
SignatureDrift
Observed signature did not match the state’s bound signature.
Fields
reason: Box<ReplayDefenseReason>Structured invalidation reason.
Implementations§
Source§impl ReplayDefenseDecision
impl ReplayDefenseDecision
Sourcepub const fn is_invalid(&self) -> bool
pub const fn is_invalid(&self) -> bool
true when the session is invalid (any non-Valid variant).
Sourcepub fn reason(&self) -> Option<&ReplayDefenseReason>
pub fn reason(&self) -> Option<&ReplayDefenseReason>
Invalid ReplayDefenseReason when the decision is non-Valid.
Sourcepub const fn requires_forced_refresh(
&self,
policy: &ReplayDefensePolicy,
) -> bool
pub const fn requires_forced_refresh( &self, policy: &ReplayDefensePolicy, ) -> bool
true when the policy mandates a forced refresh for this
invalid decision. Used by the
AcquisitionRunner
to decide whether to call
BrowserPool::release_context
and short-circuit the run.
Trait Implementations§
Source§impl Clone for ReplayDefenseDecision
impl Clone for ReplayDefenseDecision
Source§fn clone(&self) -> ReplayDefenseDecision
fn clone(&self) -> ReplayDefenseDecision
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ReplayDefenseDecision
impl Debug for ReplayDefenseDecision
Source§impl<'de> Deserialize<'de> for ReplayDefenseDecision
impl<'de> Deserialize<'de> for ReplayDefenseDecision
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>,
Source§impl Display for ReplayDefenseDecision
impl Display for ReplayDefenseDecision
Source§impl PartialEq for ReplayDefenseDecision
impl PartialEq for ReplayDefenseDecision
Source§impl Serialize for ReplayDefenseDecision
impl Serialize for ReplayDefenseDecision
impl Eq for ReplayDefenseDecision
impl StructuralPartialEq for ReplayDefenseDecision
Auto Trait Implementations§
impl Freeze for ReplayDefenseDecision
impl RefUnwindSafe for ReplayDefenseDecision
impl Send for ReplayDefenseDecision
impl Sync for ReplayDefenseDecision
impl Unpin for ReplayDefenseDecision
impl UnsafeUnpin for ReplayDefenseDecision
impl UnwindSafe for ReplayDefenseDecision
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
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
key and return true if they are equal.