#[non_exhaustive]pub enum AuthLostReason {
Expired,
Revoked(String),
Unknown,
BrokerError {
reason: String,
transient: bool,
},
}Expand description
Why the bearer was invalidated. Maps 1:1 to the broker error variants per spec §4.4 — adopter UX can surface “session expired” vs “agent revoked” vs “server hiccup” distinctly.
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.
Expired
Revoked(String)
Unknown
Broker started returning Ok(None) — bearer no longer
recognised (admin deleted the pairing? token rotation gone
wrong?). Treated the same as expired/revoked at the client.
BrokerError
Broker hard error (Err(Internal) or Err(Lookup)). Includes
the broker’s reason string. Distinct from Expired/Revoked
so the adopter can decide whether to retry the validation
(transient) or close the stream (persistent).
Trait Implementations§
Source§impl Clone for AuthLostReason
impl Clone for AuthLostReason
Source§impl Debug for AuthLostReason
impl Debug for AuthLostReason
impl Eq for AuthLostReason
Source§impl PartialEq for AuthLostReason
impl PartialEq for AuthLostReason
impl StructuralPartialEq for AuthLostReason
Auto Trait Implementations§
impl Freeze for AuthLostReason
impl RefUnwindSafe for AuthLostReason
impl Send for AuthLostReason
impl Sync for AuthLostReason
impl Unpin for AuthLostReason
impl UnsafeUnpin for AuthLostReason
impl UnwindSafe for AuthLostReason
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