#[non_exhaustive]pub enum Error {
Show 19 variants
Server(Box<DbError>),
Protocol(Error),
Io(Error),
Tls(Error),
Config(String),
Closed,
ConnectionFailed(String),
PoolTimedOut,
PoolClosed,
RowNotFound,
ColumnNotFound(String),
UnexpectedNull(String),
Decode(String),
Encode(String),
Time(Error),
Uuid(Error),
Json(Error),
IpNetwork(IpNetworkError),
Utf8(Utf8Error),
}Expand description
The error type returned by every fallible operation in this crate.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Server(Box<DbError>)
A server-reported error (ErrorResponse).
Boxed to keep every Result<T, Error> small: [DbError] is ~250 bytes.
Protocol(Error)
A wire-protocol, decode, encode or authentication error.
Io(Error)
An I/O error on the connection.
Tls(Error)
A TLS error.
Config(String)
The connection string is invalid or unsupported.
Closed
The connection or pool has been closed.
ConnectionFailed(String)
The connection failed while a result was still streaming.
The message describes the underlying cause (protocol error, I/O failure, …).
PoolTimedOut
Acquiring a pooled connection timed out.
PoolClosed
The connection pool has been closed.
RowNotFound
A query expected exactly one row but found none.
ColumnNotFound(String)
A column name was not present in the result set.
UnexpectedNull(String)
A NULL was found where a non-nullable value was expected.
Decode(String)
A value could not be decoded.
Encode(String)
A value could not be encoded.
Time(Error)
A value was not a valid time date/time.
Uuid(Error)
A value was not a valid UUID.
Json(Error)
A value was not valid JSON.
IpNetwork(IpNetworkError)
A value was not a valid IP network.
Utf8(Utf8Error)
A string was not valid UTF-8.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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()