#[non_exhaustive]pub enum PgWireError {
Io(Error),
Pg(PgError),
Protocol(String),
ConnectionClosed,
}Expand description
Top-level error type returned by pg-wired.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Io(Error)
Local I/O failure (TCP, TLS, or read/write on the socket).
Pg(PgError)
PostgreSQL returned an ErrorResponse message. Inspect the wrapped
PgError for SQLSTATE code and detail fields.
Protocol(String)
Server response could not be parsed as a valid v3 protocol message, or the message arrived out of order for the current connection state.
ConnectionClosed
The connection was closed mid-operation (peer disconnect, EOF on read, reader/writer task died).
Trait Implementations§
Source§impl Debug for PgWireError
impl Debug for PgWireError
Source§impl Display for PgWireError
impl Display for PgWireError
Source§impl Error for PgWireError
impl Error for PgWireError
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 PgWireError
impl !RefUnwindSafe for PgWireError
impl Send for PgWireError
impl Sync for PgWireError
impl Unpin for PgWireError
impl UnsafeUnpin for PgWireError
impl !UnwindSafe for PgWireError
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