#[non_exhaustive]pub enum AuthCause {
NoKey,
EmptyKey,
Refused,
SignInFailed,
Local,
SignInRequired,
}Expand description
Why authentication failed.
The split that matters is whether signing in again could help. It can when the service refused a key or the sign in itself failed. It cannot create a key that was never configured, or fix a path on this machine.
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.
NoKey
Nothing is configured: no environment variable, no keychain entry and no credentials file.
EmptyKey
A key was supplied and it was blank.
Refused
The service answered 401.
SignInFailed
The sign in flow itself failed: the browser step, the token exchange or a bad state.
Local
A problem on this machine: no home directory, a file that could not be written or narrowed, or a configured address that is not one.
SignInRequired
The call went out with no key and the service asked for an account. Signing in is the way forward, and the same call then works.
Trait Implementations§
impl Copy for AuthCause
impl Eq for AuthCause
impl StructuralPartialEq for AuthCause
Auto Trait Implementations§
impl Forget for AuthCause
impl Freeze for AuthCause
impl Move for AuthCause
impl RefUnwindSafe for AuthCause
impl Send for AuthCause
impl Sync for AuthCause
impl Unpin for AuthCause
impl UnsafeUnpin for AuthCause
impl UnwindSafe for AuthCause
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