Enum axum_restful::error::AppError
source · pub enum AppError {
InternalServer {
location: Location,
},
CreateInstance {
source: DbErr,
location: Location,
},
PrimaryKeyNotFound {
pk: u64,
location: Location,
},
OperateDatabase {
source: DbErr,
location: Location,
},
OptionValueNone {
location: Location,
},
Unknown,
}
Variants§
Trait Implementations§
source§impl Error for AppError
impl Error for AppError
source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§fn cause(&self) -> Option<&dyn Error>
fn cause(&self) -> Option<&dyn Error>
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§impl ErrorCompat for AppError
impl ErrorCompat for AppError
source§fn iter_chain(&self) -> ChainCompat<'_>where
Self: AsErrorSource,
fn iter_chain(&self) -> ChainCompat<'_>where
Self: AsErrorSource,
Returns an iterator for traversing the chain of errors,
starting with the current error
and continuing with recursive calls to
Error::source
. Read moresource§impl IntoError<AppError> for CreateInstanceSnafu
impl IntoError<AppError> for CreateInstanceSnafu
source§impl IntoError<AppError> for InternalServerSnafu
impl IntoError<AppError> for InternalServerSnafu
source§impl IntoError<AppError> for OperateDatabaseSnafu
impl IntoError<AppError> for OperateDatabaseSnafu
source§impl IntoError<AppError> for OptionValueNoneSnafu
impl IntoError<AppError> for OptionValueNoneSnafu
source§impl<__T0> IntoError<AppError> for PrimaryKeyNotFoundSnafu<__T0>
impl<__T0> IntoError<AppError> for PrimaryKeyNotFoundSnafu<__T0>
source§impl IntoError<AppError> for UnknownSnafu
impl IntoError<AppError> for UnknownSnafu
source§impl IntoResponse for AppError
impl IntoResponse for AppError
source§fn into_response(self) -> Response
fn into_response(self) -> Response
Create a response.
source§impl OperationOutput for AppError
impl OperationOutput for AppError
source§fn operation_response(
ctx: &mut GenContext,
operation: &mut Operation
) -> Option<Response>
fn operation_response( ctx: &mut GenContext, operation: &mut Operation ) -> Option<Response>
Return a response documentation for this type,
alternatively modify the operation if required. Read more
source§fn inferred_responses(
ctx: &mut GenContext,
operation: &mut Operation
) -> Vec<(Option<u16>, Response)>
fn inferred_responses( ctx: &mut GenContext, operation: &mut Operation ) -> Vec<(Option<u16>, Response)>
Inferred responses are used when the type is
used as a request handler return type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for AppError
impl Send for AppError
impl Sync for AppError
impl Unpin for AppError
impl !UnwindSafe for AppError
Blanket Implementations§
source§impl<T> AsErrorSource for Twhere
T: Error + 'static,
impl<T> AsErrorSource for Twhere
T: Error + 'static,
source§fn as_error_source(&self) -> &(dyn Error + 'static)
fn as_error_source(&self) -> &(dyn Error + 'static)
For maximum effectiveness, this needs to be called as a method
to benefit from Rust’s automatic dereferencing of method
receivers.
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<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>
§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string
, but without panic on OOM.