pub enum OrmError {
Database(PgError),
RecordNotFound,
MultipleRecordsFound,
Extraction(String),
ModelError(String),
Validation(Vec<String>),
}Expand description
Error type for the Chopin ORM.
All variants are Send + Sync, making this safe to use across thread boundaries.
Variants§
Database(PgError)
Error from the underlying PostgreSQL driver.
RecordNotFound
No records were found for a query that expected at least one.
MultipleRecordsFound
Multiple records were found for a query that expected exactly one.
Extraction(String)
Error during data extraction or type conversion from a row.
ModelError(String)
Model-specific configuration or logic error.
Validation(Vec<String>)
One or more validation rules failed.
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()
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