pub enum PgError {
Connection(String),
Protocol(String),
Auth(String),
Query(String),
NoRows,
Io(Error),
Encode(String),
Timeout(String),
PoolExhausted {
max: usize,
},
PoolClosed,
}Expand description
Error type for PostgreSQL driver operations.
Variants§
Connection(String)
TCP / TLS connection failure with the PostgreSQL server.
Protocol(String)
Wire-protocol framing or decoding error.
Auth(String)
Authentication failure (bad password, unsupported mechanism, etc.).
Query(String)
Query execution error returned by the backend (e.g. constraint violation).
NoRows
The query returned zero rows when at least one was expected.
Io(Error)
I/O error (preserves inner error for chaining)
Encode(String)
Encoding error (parameter limit, etc.)
Timeout(String)
Operation timed out (connection, acquire, query)
PoolExhausted
Pool exhausted — all connections are in use
PoolClosed
Pool is closed and no longer accepting requests
Trait Implementations§
Source§impl Error for PgError
impl Error for PgError
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 PgError
impl !RefUnwindSafe for PgError
impl Send for PgError
impl Sync for PgError
impl Unpin for PgError
impl UnsafeUnpin for PgError
impl !UnwindSafe for PgError
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