#[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
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)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
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
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.