Enum mcaptcha::errors::ServiceError
source · pub enum ServiceError {
Show 21 variants
InternalServerError,
ClosedForRegistration,
NotAnEmail,
NotAUrl,
WrongPassword,
UsernameNotFound,
AccountNotFound,
ProfainityError,
BlacklistError,
UsernameCaseMappedError,
PasswordTooShort,
PasswordTooLong,
PasswordsDontMatch,
UsernameTaken,
EmailTaken,
UnableToSendEmail(SmtpErrorWrapper),
TokenNotFound,
CaptchaError(CaptchaError),
DBError(DBErrorWrapper),
CaptchaNotFound,
TrafficPatternNotFound,
}
Variants§
InternalServerError
ClosedForRegistration
NotAnEmail
NotAUrl
WrongPassword
UsernameNotFound
AccountNotFound
ProfainityError
when the value passed contains profainity
BlacklistError
when the value passed contains blacklisted words see blacklist
UsernameCaseMappedError
when the value passed contains characters not present in UsernameCaseMapped profile
PasswordTooShort
PasswordTooLong
PasswordsDontMatch
UsernameTaken
when the a username is already taken
EmailTaken
email is already taken
UnableToSendEmail(SmtpErrorWrapper)
Unable to send email
TokenNotFound
token not found
CaptchaError(CaptchaError)
DBError(DBErrorWrapper)
CaptchaNotFound
captcha not found
TrafficPatternNotFound
Traffic pattern not found
Trait Implementations§
source§impl Debug for ServiceError
impl Debug for ServiceError
source§impl Display for ServiceError
impl Display for ServiceError
source§impl Error for ServiceError
impl Error for ServiceError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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<CaptchaError> for ServiceError
impl From<CaptchaError> for ServiceError
source§fn from(e: CaptchaError) -> ServiceError
fn from(e: CaptchaError) -> ServiceError
Converts to this type from the input type.
source§impl From<CredsError> for ServiceError
impl From<CredsError> for ServiceError
source§fn from(e: CredsError) -> ServiceError
fn from(e: CredsError) -> ServiceError
Converts to this type from the input type.
source§impl From<DBError> for ServiceError
impl From<DBError> for ServiceError
source§fn from(e: DBError) -> ServiceError
fn from(e: DBError) -> ServiceError
Converts to this type from the input type.
source§impl From<Error> for ServiceError
impl From<Error> for ServiceError
source§impl From<MailboxError> for ServiceError
impl From<MailboxError> for ServiceError
source§impl From<ParseError> for ServiceError
impl From<ParseError> for ServiceError
source§fn from(_: ParseError) -> ServiceError
fn from(_: ParseError) -> ServiceError
Converts to this type from the input type.
source§impl From<RecvError> for ServiceError
impl From<RecvError> for ServiceError
source§impl From<ServiceError> for PageError
impl From<ServiceError> for PageError
source§fn from(e: ServiceError) -> Self
fn from(e: ServiceError) -> Self
Converts to this type from the input type.
source§impl From<ValidationErrors> for ServiceError
impl From<ValidationErrors> for ServiceError
source§fn from(_: ValidationErrors) -> ServiceError
fn from(_: ValidationErrors) -> ServiceError
Converts to this type from the input type.
source§impl PartialEq<ServiceError> for ServiceError
impl PartialEq<ServiceError> for ServiceError
source§fn eq(&self, other: &ServiceError) -> bool
fn eq(&self, other: &ServiceError) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl ResponseError for ServiceError
impl ResponseError for ServiceError
source§fn error_response(&self) -> HttpResponse
fn error_response(&self) -> HttpResponse
Creates full response for error. Read more
source§fn status_code(&self) -> StatusCode
fn status_code(&self) -> StatusCode
Returns appropriate status code for error. Read more