pub enum AuthError {
Show 13 variants
Configuration {
message: String,
},
AuthMethod {
method: String,
message: String,
},
Token(TokenError),
Permission(PermissionError),
Storage(StorageError),
Network(Error),
Json(Error),
Jwt(Error),
RateLimit {
message: String,
},
Mfa(MfaError),
Crypto {
message: String,
},
Validation {
message: String,
},
Internal {
message: String,
},
}Expand description
Main error type for the authentication framework.
Variants§
Configuration
Configuration errors
AuthMethod
Authentication method errors
Token(TokenError)
Token-related errors
Permission(PermissionError)
Permission-related errors
Storage(StorageError)
Storage-related errors
Network(Error)
Network/HTTP errors
Json(Error)
JSON parsing errors
Jwt(Error)
JWT errors
RateLimit
Rate limiting errors
Mfa(MfaError)
MFA-related errors
Crypto
Cryptography errors
Validation
Validation errors
Internal
Generic internal errors
Implementations§
Source§impl AuthError
impl AuthError
Sourcepub fn auth_method(
method: impl Into<String>,
message: impl Into<String>,
) -> Self
pub fn auth_method( method: impl Into<String>, message: impl Into<String>, ) -> Self
Create a new auth method error
Sourcepub fn rate_limit(message: impl Into<String>) -> Self
pub fn rate_limit(message: impl Into<String>) -> Self
Create a new rate limit error
Sourcepub fn validation(message: impl Into<String>) -> Self
pub fn validation(message: impl Into<String>) -> Self
Create a new validation error
Trait Implementations§
Source§impl Error for AuthError
impl Error for AuthError
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()
Source§impl From<PermissionError> for AuthError
impl From<PermissionError> for AuthError
Source§fn from(source: PermissionError) -> Self
fn from(source: PermissionError) -> Self
Converts to this type from the input type.
Source§impl From<StorageError> for AuthError
impl From<StorageError> for AuthError
Source§fn from(source: StorageError) -> Self
fn from(source: StorageError) -> Self
Converts to this type from the input type.
Source§impl From<TokenError> for AuthError
impl From<TokenError> for AuthError
Source§fn from(source: TokenError) -> Self
fn from(source: TokenError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for AuthError
impl !RefUnwindSafe for AuthError
impl Send for AuthError
impl Sync for AuthError
impl Unpin 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