#[non_exhaustive]pub enum RustangoError {
Show 22 variants
Sql(ExecError),
Migrate(MigrateError),
Forms(FormErrors),
Cache(CacheError),
Mail(MailError),
Storage(StorageError),
Auth(AuthError),
JwtIssue(JwtIssueError),
Password(PasswordError),
ApiKey(ApiKeyError),
SignedUrl(SignedUrlError),
AuthFlow(AuthFlowError),
BulkAction(BulkActionError),
IpFilter(IpFilterError),
Job(JobError),
Fixture(FixtureError),
I18n(I18nError),
Env(EnvError),
Secrets(SecretsError),
Io(Error),
Serde(Error),
Other(Box<dyn Error + Send + Sync + 'static>),
}Expand description
One error type for app code. Every framework error has a From
impl into it, so ? works in a handler.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Sql(ExecError)
SQL execution or driver error.
Migrate(MigrateError)
Migration runner, file or diff error.
Forms(FormErrors)
Form parsing or validation error.
Cache(CacheError)
Cache backend error.
Mail(MailError)
Email send failure.
Storage(StorageError)
File storage error.
Auth(AuthError)
Auth backend or login failure.
JwtIssue(JwtIssueError)
JWT issuance failed, such as a reserved claim.
Password(PasswordError)
Generic password helper error.
ApiKey(ApiKeyError)
API key could not be made or verified.
SignedUrl(SignedUrlError)
Signed URL could not be parsed or verified.
AuthFlow(AuthFlowError)
Auth flow error: password reset, email verify, magic link.
BulkAction(BulkActionError)
Bulk-action runner error.
IpFilter(IpFilterError)
IP filter could not be parsed, such as a bad CIDR.
Job(JobError)
Job queue error.
Fixture(FixtureError)
Fixture loader error.
I18n(I18nError)
Translation loader error.
Env(EnvError)
Env variable missing or unparseable.
Secrets(SecretsError)
Secrets backend error.
Io(Error)
File, network or other I/O.
Serde(Error)
JSON encode or decode.
Other(Box<dyn Error + Send + Sync + 'static>)
Anything else: a third-party error or an ad-hoc bail-out.
Implementations§
Trait Implementations§
Source§impl Debug for RustangoError
impl Debug for RustangoError
Source§impl Display for RustangoError
impl Display for RustangoError
Source§impl Error for RustangoError
impl Error for RustangoError
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()
Source§impl From<ApiKeyError> for RustangoError
Available on crate feature api_keys only.
impl From<ApiKeyError> for RustangoError
api_keys only.Source§fn from(e: ApiKeyError) -> Self
fn from(e: ApiKeyError) -> Self
Source§impl From<AuthError> for RustangoError
Available on crate feature tenancy only.
impl From<AuthError> for RustangoError
tenancy only.Source§impl From<AuthFlowError> for RustangoError
Available on crate feature auth_flows only.
impl From<AuthFlowError> for RustangoError
auth_flows only.Source§fn from(e: AuthFlowError) -> Self
fn from(e: AuthFlowError) -> Self
Source§impl From<BulkActionError> for RustangoError
Available on crate feature tenancy only.
impl From<BulkActionError> for RustangoError
tenancy only.Source§fn from(e: BulkActionError) -> Self
fn from(e: BulkActionError) -> Self
Source§impl From<CacheError> for RustangoError
Available on crate feature cache only.
impl From<CacheError> for RustangoError
cache only.Source§fn from(e: CacheError) -> Self
fn from(e: CacheError) -> Self
Source§impl From<EnvError> for RustangoError
impl From<EnvError> for RustangoError
Source§impl From<Error> for RustangoError
impl From<Error> for RustangoError
Source§impl From<Error> for RustangoError
impl From<Error> for RustangoError
Source§impl From<ExecError> for RustangoError
impl From<ExecError> for RustangoError
Source§impl From<FixtureError> for RustangoError
impl From<FixtureError> for RustangoError
Source§fn from(e: FixtureError) -> Self
fn from(e: FixtureError) -> Self
Source§impl From<FormErrors> for RustangoError
Available on crate feature forms only.
impl From<FormErrors> for RustangoError
forms only.Source§fn from(e: FormErrors) -> Self
fn from(e: FormErrors) -> Self
Source§impl From<I18nError> for RustangoError
impl From<I18nError> for RustangoError
Source§impl From<IpFilterError> for RustangoError
Available on crate feature admin only.
impl From<IpFilterError> for RustangoError
admin only.Source§fn from(e: IpFilterError) -> Self
fn from(e: IpFilterError) -> Self
Source§impl From<JobError> for RustangoError
Available on crate feature jobs only.
impl From<JobError> for RustangoError
jobs only.Source§impl From<JwtIssueError> for RustangoError
Available on crate feature tenancy only.
impl From<JwtIssueError> for RustangoError
tenancy only.Source§fn from(e: JwtIssueError) -> Self
fn from(e: JwtIssueError) -> Self
Source§impl From<MailError> for RustangoError
Available on crate feature email only.
impl From<MailError> for RustangoError
email only.Source§impl From<MigrateError> for RustangoError
impl From<MigrateError> for RustangoError
Source§fn from(e: MigrateError) -> Self
fn from(e: MigrateError) -> Self
Source§impl From<PasswordError> for RustangoError
Available on crate feature passwords only.
impl From<PasswordError> for RustangoError
passwords only.Source§fn from(e: PasswordError) -> Self
fn from(e: PasswordError) -> Self
Source§impl From<SecretsError> for RustangoError
Available on crate feature secrets only.
impl From<SecretsError> for RustangoError
secrets only.Source§fn from(e: SecretsError) -> Self
fn from(e: SecretsError) -> Self
Source§impl From<SignedUrlError> for RustangoError
Available on crate feature signed_url only.
impl From<SignedUrlError> for RustangoError
signed_url only.Source§fn from(e: SignedUrlError) -> Self
fn from(e: SignedUrlError) -> Self
Source§impl From<StorageError> for RustangoError
Available on crate feature storage only.
impl From<StorageError> for RustangoError
storage only.Source§fn from(e: StorageError) -> Self
fn from(e: StorageError) -> Self
Source§impl IntoResponse for RustangoError
impl IntoResponse for RustangoError
Source§fn into_response(self) -> Response
fn into_response(self) -> Response
Auto Trait Implementations§
impl !RefUnwindSafe for RustangoError
impl !UnwindSafe for RustangoError
impl Freeze for RustangoError
impl Send for RustangoError
impl Sync for RustangoError
impl Unpin for RustangoError
impl UnsafeUnpin for RustangoError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more