pub enum EFError {
Connection(String, Option<BoxError>),
Query(String, Option<BoxError>),
NotFound(String, Option<BoxError>),
ModelValidation(String, Option<BoxError>),
Migration(String, Option<BoxError>),
Provider(String, Option<BoxError>),
Configuration(String, Option<BoxError>),
ChangeTracking(String, Option<BoxError>),
Transaction(String, Option<BoxError>),
ConcurrencyConflict(String, Option<BoxError>),
TypeConversion(String, Option<BoxError>),
Other(String, Option<BoxError>),
}Expand description
Represents all possible errors that can occur in rust-ef operations.
Variants§
Connection(String, Option<BoxError>)
Database connection error.
Query(String, Option<BoxError>)
Query execution error.
NotFound(String, Option<BoxError>)
Entity not found error.
ModelValidation(String, Option<BoxError>)
Model validation error.
Migration(String, Option<BoxError>)
Migration error.
Provider(String, Option<BoxError>)
Provider-specific error.
Configuration(String, Option<BoxError>)
Configuration error.
ChangeTracking(String, Option<BoxError>)
Change tracking error.
Transaction(String, Option<BoxError>)
Transaction error.
ConcurrencyConflict(String, Option<BoxError>)
Concurrency conflict error.
TypeConversion(String, Option<BoxError>)
Type conversion error.
Other(String, Option<BoxError>)
General / unknown error.
Implementations§
Source§impl EFError
impl EFError
pub fn connection(msg: impl Into<String>) -> Self
pub fn query(msg: impl Into<String>) -> Self
pub fn not_found(msg: impl Into<String>) -> Self
pub fn model_validation(msg: impl Into<String>) -> Self
pub fn migration(msg: impl Into<String>) -> Self
pub fn provider(msg: impl Into<String>) -> Self
pub fn configuration(msg: impl Into<String>) -> Self
pub fn change_tracking(msg: impl Into<String>) -> Self
pub fn transaction(msg: impl Into<String>) -> Self
pub fn concurrency_conflict(msg: impl Into<String>) -> Self
pub fn type_conversion(msg: impl Into<String>) -> Self
pub fn other(msg: impl Into<String>) -> Self
Sourcepub fn with_source(self, source: BoxError) -> Self
pub fn with_source(self, source: BoxError) -> Self
Attaches a source error to this EFError, preserving the error chain.
Trait Implementations§
Source§impl Error for EFError
impl Error for EFError
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<DbValueConvertError> for EFError
impl From<DbValueConvertError> for EFError
Source§fn from(e: DbValueConvertError) -> Self
fn from(e: DbValueConvertError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for EFError
impl !UnwindSafe for EFError
impl Freeze for EFError
impl Send for EFError
impl Sync for EFError
impl Unpin for EFError
impl UnsafeUnpin for EFError
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