pub enum PgWireError {
Io(String),
Protocol(String),
Server(String),
Auth(String),
Tls(String),
Task(String),
Internal(String),
}Expand description
Error type for all pgwire-replication operations.
Variants§
Io(String)
I/O error (network, file system).
Note: std::io::Error is not Clone, so we store the message.
Protocol(String)
Protocol error - malformed message or unexpected response.
Server(String)
Server error - PostgreSQL returned an error response.
The message typically includes SQLSTATE code.
Auth(String)
Authentication error - wrong credentials or unsupported method.
Tls(String)
TLS error - handshake failure, certificate validation, etc.
Task(String)
Task error - worker panicked or terminated unexpectedly.
Internal(String)
Internal error - bug in the library.
Implementations§
Source§impl PgWireError
impl PgWireError
Sourcepub fn is_transient(&self) -> bool
pub fn is_transient(&self) -> bool
Returns true if this error is likely transient and retryable.
Transient errors include I/O errors and task errors. Non-transient errors (auth, server, protocol) typically require configuration changes.
Trait Implementations§
Source§impl Clone for PgWireError
impl Clone for PgWireError
Source§fn clone(&self) -> PgWireError
fn clone(&self) -> PgWireError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§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
1.30.0 · 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 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