#[non_exhaustive]pub enum OrmError {
Query(QueryError),
Backend(BackendError),
Capability(BackendCapabilityError),
Cursor(CursorError),
Signal(SignalError),
UnknownDatabase(String),
}Expand description
Top-level ORM error.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Query(QueryError)
Query-construction or result error.
Backend(BackendError)
Backend failure.
Capability(BackendCapabilityError)
Capability mismatch.
Cursor(CursorError)
A pagination cursor from the client was rejected.
Signal(SignalError)
A signal receiver failed. A failing pre_* receiver aborted the
operation; a failing post_* receiver ran after the statement.
Maps to HTTP 500 (ApiError: From<OrmError> falls through to internal).
UnknownDatabase(String)
A database alias is not registered in Databases.
A configuration problem (a router named an alias that was never
registered, or there is no "default"), so it maps to HTTP 500.
Trait Implementations§
Source§impl Error for OrmError
impl Error for OrmError
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<BackendCapabilityError> for OrmError
impl From<BackendCapabilityError> for OrmError
Source§fn from(source: BackendCapabilityError) -> Self
fn from(source: BackendCapabilityError) -> Self
Converts to this type from the input type.
Source§impl From<BackendError> for OrmError
impl From<BackendError> for OrmError
Source§fn from(source: BackendError) -> Self
fn from(source: BackendError) -> Self
Converts to this type from the input type.
Source§impl From<CursorError> for OrmError
impl From<CursorError> for OrmError
Source§fn from(source: CursorError) -> Self
fn from(source: CursorError) -> Self
Converts to this type from the input type.
Source§impl From<OrmError> for SignalError
impl From<OrmError> for SignalError
Source§impl From<QueryError> for OrmError
impl From<QueryError> for OrmError
Source§fn from(source: QueryError) -> Self
fn from(source: QueryError) -> Self
Converts to this type from the input type.
Source§impl From<SignalError> for OrmError
impl From<SignalError> for OrmError
Source§fn from(source: SignalError) -> Self
fn from(source: SignalError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for OrmError
impl !UnwindSafe for OrmError
impl Freeze for OrmError
impl Send for OrmError
impl Sync for OrmError
impl Unpin for OrmError
impl UnsafeUnpin for OrmError
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