#[non_exhaustive]pub enum SessionLivenessError {
Revoked,
Transient(String),
}Expand description
Per-request liveness failure surface.
Two variants — Revoked (substrate said “no”) and Transient
(substrate couldn’t answer) — collapse to typed
crate::VerifyError variants in the verifier so audit logs pivot
L2-revoked vs L2-substrate-down distinct from L1 sv-axis events.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Revoked
Session row absent OR revoked_at is set. Token rejected as
crate::VerifyError::SessionRevoked. The two surface causes
(absent row vs revoked row) collapse to one variant because
audit-time distinction is rarely actionable: a user whose row
was deleted is in the same security state as one whose row was
flipped to revoked. Substrate-side logging records the cause if
needed.
Transient(String)
Substrate could not answer (connection error, query timeout,
schema unavailable). Carries a free-form detail for audit logs;
the verifier collapses every Transient variant onto
crate::VerifyError::SessionLivenessLookupUnavailable
(fail-closed) so the engine sees a uniform contract regardless
of substrate flavor.
Trait Implementations§
Source§impl Debug for SessionLivenessError
impl Debug for SessionLivenessError
Source§impl Display for SessionLivenessError
impl Display for SessionLivenessError
Source§impl Error for SessionLivenessError
impl Error for SessionLivenessError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for SessionLivenessError
impl RefUnwindSafe for SessionLivenessError
impl Send for SessionLivenessError
impl Sync for SessionLivenessError
impl Unpin for SessionLivenessError
impl UnsafeUnpin for SessionLivenessError
impl UnwindSafe for SessionLivenessError
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.