#[non_exhaustive]pub enum PasFailure {
Rejected {
status: u16,
detail: String,
},
ServerError {
status: u16,
detail: String,
},
Transport {
detail: String,
},
}Expand description
Classified PAS-side failure. Single source of truth for the HTTP-status → cause mapping; only adapters produce these.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Rejected
PAS returned 4xx — credential is dead. Refresh-token expired, revoked, or user logged out elsewhere.
ServerError
PAS returned 5xx — service is degraded. Retry; do not invalidate.
Transport
HTTP-level transport issue (timeout, TLS, DNS, connect) OR a 2xx whose body failed to parse (CDN/proxy garbage). Indistinguishable from a true network blip; fail-open paths serve cache, fail-closed paths reject.
Implementations§
Source§impl PasFailure
impl PasFailure
Sourcepub fn into_legacy_error(self, operation: &'static str) -> Error
pub fn into_legacy_error(self, operation: &'static str) -> Error
Lossy conversion to the legacy Error::OAuth shape, used by
inherent AuthClient methods that retain the v4 signature
(currently just exchange_code).
Trait Implementations§
Source§impl Clone for PasFailure
impl Clone for PasFailure
Source§fn clone(&self) -> PasFailure
fn clone(&self) -> PasFailure
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 PasFailure
impl RefUnwindSafe for PasFailure
impl Send for PasFailure
impl Sync for PasFailure
impl Unpin for PasFailure
impl UnsafeUnpin for PasFailure
impl UnwindSafe for PasFailure
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