pub enum ClientError {
Show 17 variants
ConnectionFailed(String),
ConnectionTimeout,
ConnectionClosed,
QueryFailed(String),
TransactionFailed(String),
InvalidConfig(String),
InvalidUrl(String),
AuthenticationFailed(String),
PoolExhausted,
PoolTimeout,
SerializationError(String),
IoError(String),
ProtocolError(String),
ServerError {
code: i32,
message: String,
},
NotConnected,
NoTransaction,
TransactionAlreadyStarted,
}Expand description
Errors that can occur during client operations.
Variants§
ConnectionFailed(String)
Connection failed.
ConnectionTimeout
Connection timeout.
ConnectionClosed
Connection closed.
QueryFailed(String)
Query execution failed.
TransactionFailed(String)
Transaction failed.
InvalidConfig(String)
Invalid configuration.
InvalidUrl(String)
Invalid URL format.
AuthenticationFailed(String)
Authentication failed.
PoolExhausted
Pool exhausted.
PoolTimeout
Pool timeout.
SerializationError(String)
Serialization error.
IoError(String)
IO error.
ProtocolError(String)
Protocol error.
ServerError
Server error.
NotConnected
Not connected.
NoTransaction
Transaction not started.
TransactionAlreadyStarted
Transaction already started.
Implementations§
Source§impl ClientError
impl ClientError
Sourcepub fn is_retryable(&self) -> bool
pub fn is_retryable(&self) -> bool
Check if the error is retryable.
Sourcepub fn is_connection_error(&self) -> bool
pub fn is_connection_error(&self) -> bool
Check if the error is a connection error.
Sourcepub fn is_server_error(&self) -> bool
pub fn is_server_error(&self) -> bool
Check if the error is a server error.
Trait Implementations§
Source§impl Clone for ClientError
impl Clone for ClientError
Source§fn clone(&self) -> ClientError
fn clone(&self) -> ClientError
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 ClientError
impl Debug for ClientError
Source§impl Display for ClientError
impl Display for ClientError
Source§impl Error for ClientError
impl Error for ClientError
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 ClientError
impl RefUnwindSafe for ClientError
impl Send for ClientError
impl Sync for ClientError
impl Unpin for ClientError
impl UnsafeUnpin for ClientError
impl UnwindSafe for ClientError
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