pub enum OrmError {
Message(String),
Connection(OrmErrorContext),
Compile(OrmErrorContext),
Migration(OrmErrorContext),
Mapping(OrmErrorContext),
Execution(OrmErrorContext),
Transaction(OrmErrorContext),
Concurrency(OrmErrorContext),
ConcurrencyConflict,
}Expand description
Common error type for the workspace.
Variants§
Message(String)
Connection(OrmErrorContext)
Compile(OrmErrorContext)
Migration(OrmErrorContext)
Mapping(OrmErrorContext)
Execution(OrmErrorContext)
Transaction(OrmErrorContext)
Concurrency(OrmErrorContext)
ConcurrencyConflict
Implementations§
Source§impl OrmError
impl OrmError
pub fn new(message: impl Into<String>) -> Self
pub fn connection(message: impl Into<String>) -> Self
pub fn connection_with_source( message: impl Into<String>, source: impl Error + Send + Sync + 'static, ) -> Self
pub fn compile(message: impl Into<String>) -> Self
pub fn compile_with_source( message: impl Into<String>, source: impl Error + Send + Sync + 'static, ) -> Self
pub fn migration(message: impl Into<String>) -> Self
pub fn migration_with_source( message: impl Into<String>, source: impl Error + Send + Sync + 'static, ) -> Self
pub fn mapping(message: impl Into<String>) -> Self
pub fn mapping_with_source( message: impl Into<String>, source: impl Error + Send + Sync + 'static, ) -> Self
pub fn execution(message: impl Into<String>) -> Self
pub fn execution_with_source( message: impl Into<String>, source: impl Error + Send + Sync + 'static, ) -> Self
pub fn transaction(message: impl Into<String>) -> Self
pub fn transaction_with_source( message: impl Into<String>, source: impl Error + Send + Sync + 'static, ) -> Self
pub fn concurrency(message: impl Into<String>) -> Self
pub fn concurrency_with_source( message: impl Into<String>, source: impl Error + Send + Sync + 'static, ) -> Self
pub const fn concurrency_conflict() -> Self
pub fn kind(&self) -> OrmErrorKind
pub fn message(&self) -> &str
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()
impl Eq for OrmError
impl StructuralPartialEq for OrmError
Auto Trait Implementations§
impl Freeze for OrmError
impl !RefUnwindSafe for OrmError
impl Send for OrmError
impl Sync for OrmError
impl Unpin for OrmError
impl UnsafeUnpin for OrmError
impl !UnwindSafe 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