pub enum AuthStatusOutcome {
LoggedIn {
server: String,
user: Option<String>,
expires_at: Option<DateTime<Utc>>,
expired: bool,
},
AuthenticatedViaEnv {
server: String,
expires_at: Option<DateTime<Utc>>,
expired: bool,
},
NotLoggedIn {
server: String,
},
}Expand description
Outcome passed to Renderer::auth_status — either logged-in or not.
Variants§
LoggedIn
A token for this server exists in the auth cache.
Fields
AuthenticatedViaEnv
A token was supplied via the DSP_TOKEN environment variable, which
overrides the cached token (ADR-0007). No user is available (the cached
user comes from the login response body, not from the token itself).
Expiry is read via client::jwt::extract_exp for display only; if the
token is not a parseable JWT, expires_at is None (“expiry unknown”).
Fields
NotLoggedIn
No token for this server in the auth cache (or no cache file).
Auto Trait Implementations§
impl Freeze for AuthStatusOutcome
impl RefUnwindSafe for AuthStatusOutcome
impl Send for AuthStatusOutcome
impl Sync for AuthStatusOutcome
impl Unpin for AuthStatusOutcome
impl UnsafeUnpin for AuthStatusOutcome
impl UnwindSafe for AuthStatusOutcome
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