pub enum ReplayDefenseError {
Replayed,
Transient(String),
}Expand description
Failure modes from a ReplayDefense substrate call.
Two variants — adapters MUST NOT collapse them. Replayed is an
attack signal (someone presented the same jti twice within TTL);
Transient is an infrastructure signal (substrate unreachable).
Audit log routing differs (security incident vs ops alert), and
the engine maps each to its own AuthError variant.
Variants§
Replayed
The jti hash was already recorded within TTL — replay detected.
Engine maps to AuthError::JtiReplayed.
Transient(String)
Substrate transient failure — engine fails closed and maps to
AuthError::ReplayCacheUnavailable. The string carries adapter
context for ops triage (NOT for the audit log; the log keys off
the variant, not the payload).
Trait Implementations§
Source§impl Debug for ReplayDefenseError
impl Debug for ReplayDefenseError
Source§impl Display for ReplayDefenseError
impl Display for ReplayDefenseError
Source§impl Error for ReplayDefenseError
impl Error for ReplayDefenseError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for ReplayDefenseError
impl RefUnwindSafe for ReplayDefenseError
impl Send for ReplayDefenseError
impl Sync for ReplayDefenseError
impl Unpin for ReplayDefenseError
impl UnsafeUnpin for ReplayDefenseError
impl UnwindSafe for ReplayDefenseError
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