#[non_exhaustive]pub enum ConnectionErrorContent {
Mysql {
code: u16,
status: [u8; 5],
message: String,
},
Io(Error),
Decode(&'static str, DecodeError),
Bind(u16, BindError),
ProtocolError(String),
ExpectedRows,
UnexpectedRows,
TooFewListArguments,
TooManyListArguments,
InvalidUrl,
}Expand description
Error handling connection
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Mysql
An error returned by Mariadb/Mysql
Fields
Io(Error)
Network error from tokio
Decode(&'static str, DecodeError)
Error decoding row
Bind(u16, BindError)
Error binding parameter
ProtocolError(String)
Mariadb/Mysql did not speak the protocol correctly
ExpectedRows
You executed a mysql statement that does not return any columns
UnexpectedRows
You executed a mysql statement that does return columns, so you need to read the rowss
TooFewListArguments
There where more instances of LIST in the query, than there where list arguments
TooManyListArguments
There where less instances of LIST in the query, than there where list arguments
InvalidUrl
The url supplied is invalid
Trait Implementations§
Source§impl Debug for ConnectionErrorContent
impl Debug for ConnectionErrorContent
Source§impl Display for ConnectionErrorContent
impl Display for ConnectionErrorContent
Source§impl Error for ConnectionErrorContent
impl Error for ConnectionErrorContent
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 ConnectionErrorContent
impl !RefUnwindSafe for ConnectionErrorContent
impl Send for ConnectionErrorContent
impl Sync for ConnectionErrorContent
impl Unpin for ConnectionErrorContent
impl !UnwindSafe for ConnectionErrorContent
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