pub enum ServiceError {
Show 35 variants
InternalServerError,
ClosedForRegistration,
EmailMissing,
EmailInvalid,
NotAUrl,
WrongPasswordOrUsername,
UsernameNotFound,
UserNotFound,
AccountNotFound,
ProfanityError,
BlacklistError,
UsernameCaseMappedError,
PasswordTooShort,
PasswordTooLong,
PasswordsDontMatch,
UsernameTaken,
UsernameInvalid,
EmailTaken,
EmailNotVerified,
TokenNotFound,
TokenExpired,
TokenInvalid,
TorrentNotFound,
InvalidTorrentFile,
InvalidTorrentPiecesLength,
InvalidFileType,
BadRequest,
InvalidCategory,
Unauthorized,
InfoHashAlreadyExists,
TorrentTitleAlreadyExists,
TrackerOffline,
WhitelistingError,
FailedToSendVerificationEmail,
CategoryExists,
}
Variants§
InternalServerError
ClosedForRegistration
EmailMissing
EmailInvalid
NotAUrl
WrongPasswordOrUsername
UsernameNotFound
UserNotFound
AccountNotFound
ProfanityError
when the value passed contains profanity
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
UsernameInvalid
EmailTaken
email is already taken
EmailNotVerified
TokenNotFound
when the a token name is already taken token not found
TokenExpired
token expired
TokenInvalid
token invalid
TorrentNotFound
InvalidTorrentFile
InvalidTorrentPiecesLength
InvalidFileType
BadRequest
InvalidCategory
InfoHashAlreadyExists
TorrentTitleAlreadyExists
TrackerOffline
WhitelistingError
FailedToSendVerificationEmail
CategoryExists
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
1.30.0 · 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<Error> for ServiceError
impl From<Error> for ServiceError
source§impl From<Error> for ServiceError
impl From<Error> for ServiceError
source§impl From<Error> for ServiceError
impl From<Error> for ServiceError
source§impl From<Error> for ServiceError
impl From<Error> for ServiceError
source§impl From<Error> for ServiceError
impl From<Error> for ServiceError
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 status_code(&self) -> StatusCode
fn status_code(&self) -> StatusCode
Returns appropriate status code for error. Read more
source§fn error_response(&self) -> HttpResponse
fn error_response(&self) -> HttpResponse
Creates full response for error. Read more
impl Eq for ServiceError
impl StructuralEq for ServiceError
impl StructuralPartialEq for ServiceError
Auto Trait Implementations§
impl RefUnwindSafe for ServiceError
impl Send for ServiceError
impl Sync for ServiceError
impl Unpin for ServiceError
impl UnwindSafe for ServiceError
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
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.