pub enum ErrorCode {
Show 32 variants
RecordNotFound = 1_001,
NotUnique = 1_002,
InvalidFilter = 1_003,
InvalidSelect = 1_004,
RequiredFieldMissing = 1_005,
UniqueConstraint = 2_001,
ForeignKeyConstraint = 2_002,
CheckConstraint = 2_003,
NotNullConstraint = 2_004,
ConnectionFailed = 3_001,
PoolExhausted = 3_002,
ConnectionTimeout = 3_003,
AuthenticationFailed = 3_004,
SslError = 3_005,
TransactionFailed = 4_001,
Deadlock = 4_002,
SerializationFailure = 4_003,
TransactionClosed = 4_004,
QueryTimeout = 5_001,
SqlSyntax = 5_002,
InvalidParameter = 5_003,
QueryTooComplex = 5_004,
DatabaseError = 5_005,
InvalidDataType = 6_001,
SerializationError = 6_002,
DeserializationError = 6_003,
DataTruncation = 6_004,
InvalidConfiguration = 7_001,
MissingConfiguration = 7_002,
InvalidConnectionString = 7_003,
Internal = 9_001,
Unknown = 9_999,
}Expand description
Error codes for programmatic error handling.
Variants§
RecordNotFound = 1_001
Record not found (P1001).
NotUnique = 1_002
Multiple records found when expecting one (P1002).
InvalidFilter = 1_003
Invalid filter or where clause (P1003).
InvalidSelect = 1_004
Invalid select or include (P1004).
RequiredFieldMissing = 1_005
Required field missing (P1005).
UniqueConstraint = 2_001
Unique constraint violation (P2001).
ForeignKeyConstraint = 2_002
Foreign key constraint violation (P2002).
CheckConstraint = 2_003
Check constraint violation (P2003).
NotNullConstraint = 2_004
Not null constraint violation (P2004).
ConnectionFailed = 3_001
Database connection failed (P3001).
PoolExhausted = 3_002
Connection pool exhausted (P3002).
ConnectionTimeout = 3_003
Connection timeout (P3003).
AuthenticationFailed = 3_004
Authentication failed (P3004).
SslError = 3_005
SSL/TLS error (P3005).
TransactionFailed = 4_001
Transaction failed (P4001).
Deadlock = 4_002
Deadlock detected (P4002).
SerializationFailure = 4_003
Serialization failure (P4003).
TransactionClosed = 4_004
Transaction already committed/rolled back (P4004).
QueryTimeout = 5_001
Query timeout (P5001).
SqlSyntax = 5_002
SQL syntax error (P5002).
InvalidParameter = 5_003
Invalid parameter (P5003).
QueryTooComplex = 5_004
Query too complex (P5004).
DatabaseError = 5_005
General database error (P5005).
InvalidDataType = 6_001
Invalid data type (P6001).
SerializationError = 6_002
Serialization error (P6002).
DeserializationError = 6_003
Deserialization error (P6003).
DataTruncation = 6_004
Data truncation (P6004).
InvalidConfiguration = 7_001
Invalid configuration (P7001).
MissingConfiguration = 7_002
Missing configuration (P7002).
InvalidConnectionString = 7_003
Invalid connection string (P7003).
Internal = 9_001
Internal error (P9001).
Unknown = 9_999
Unknown error (P9999).
Implementations§
Trait Implementations§
impl Copy for ErrorCode
impl Eq for ErrorCode
impl StructuralPartialEq for ErrorCode
Auto Trait Implementations§
impl Freeze for ErrorCode
impl RefUnwindSafe for ErrorCode
impl Send for ErrorCode
impl Sync for ErrorCode
impl Unpin for ErrorCode
impl UnwindSafe for ErrorCode
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)