pub enum PgWireError {
Io(Arc<Error>),
Protocol(String),
Server(String),
Auth(String),
Tls(String),
Task(String),
Internal(String),
}Expand description
Error type for all pgwire-replication operations.
Variants§
Io(Arc<Error>)
I/O error (network, file system).
Wraps std::io::Error in an Arc to preserve ErrorKind while
keeping PgWireError Clone. Use .kind() via Arc’s Deref.
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
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
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)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()