#[non_exhaustive]pub enum AuthError {
InvalidCredentials(String),
AuthenticationFailed(String),
TokenExpired,
TokenAcquisition(String),
UnsupportedMethod(String),
Sspi(String),
Certificate(String),
Network(String),
Configuration(String),
AzureIdentity(String),
}Expand description
Errors that can occur during authentication.
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.
InvalidCredentials(String)
Invalid credentials provided.
AuthenticationFailed(String)
Authentication failed on server.
TokenExpired
Token expired or invalid.
TokenAcquisition(String)
Token acquisition failed.
UnsupportedMethod(String)
Unsupported authentication method.
Sspi(String)
SSPI/GSSAPI error.
Certificate(String)
Certificate error.
Network(String)
Network error during authentication.
Configuration(String)
Configuration error.
AzureIdentity(String)
Azure identity error.
Implementations§
Source§impl AuthError
impl AuthError
Sourcepub fn is_transient(&self) -> bool
pub fn is_transient(&self) -> bool
Check if this error is transient and may succeed on retry.
Network errors, token acquisition failures (may be temporary service issues), and Azure identity errors are potentially transient. Invalid credentials and unsupported methods are terminal.
Sourcepub fn is_terminal(&self) -> bool
pub fn is_terminal(&self) -> bool
Check if this error is terminal and will never succeed on retry.
Invalid credentials, unsupported methods, certificate errors, and configuration errors are permanent.
Trait Implementations§
Source§impl Error for AuthError
impl Error for AuthError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for AuthError
impl RefUnwindSafe for AuthError
impl Send for AuthError
impl Sync for AuthError
impl Unpin for AuthError
impl UnsafeUnpin for AuthError
impl UnwindSafe for AuthError
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