pub enum BackendError {
Io(Error),
Closed,
Protocol(String),
BackendError(String),
Auth(String),
Tls(String),
UnsupportedType(u32),
ParseValue {
column: String,
reason: String,
},
}Expand description
Errors produced while acting as a PostgreSQL client.
Variants§
Io(Error)
I/O on the underlying TCP or TLS stream failed.
Closed
The backend closed the connection before the expected reply arrived (e.g. TCP RST, idle timeout, server shutdown).
Protocol(String)
A protocol-level violation: unexpected message type, malformed payload, or truncated frame.
BackendError(String)
The backend returned an ErrorResponse (tag E). The string is
the M (Message) field, which is always present.
Auth(String)
Authentication did not complete successfully — wrong password, unsupported SASL mechanism, or SCRAM server verifier mismatch.
Tls(String)
TLS handshake failed. String carries the rustls diagnostic.
UnsupportedType(u32)
Unsupported type OID in a result column — the proxy only knows how to decode a fixed set of common OIDs.
ParseValue
Value parsing (text-format) failed — e.g. malformed int, bad boolean string, invalid timestamp.
Trait Implementations§
Source§impl Debug for BackendError
impl Debug for BackendError
Source§impl Display for BackendError
impl Display for BackendError
Source§impl Error for BackendError
impl Error for BackendError
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()
Auto Trait Implementations§
impl Freeze for BackendError
impl !RefUnwindSafe for BackendError
impl Send for BackendError
impl Sync for BackendError
impl Unpin for BackendError
impl UnsafeUnpin for BackendError
impl !UnwindSafe for BackendError
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoAnyhow for T
impl<T> IntoAnyhow for T
Source§fn into_anyhow(self) -> Error
fn into_anyhow(self) -> Error
self into an anyhow::Error.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more