Enum diesel::result::ConnectionError
source · #[non_exhaustive]pub enum ConnectionError {
InvalidCString(NulError),
BadConnection(String),
InvalidConnectionUrl(String),
CouldntSetupConfiguration(Error),
}
Expand description
Errors which can occur during Connection::establish
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.
InvalidCString(NulError)
The connection URL contained a NUL
byte.
BadConnection(String)
The database returned an error.
InvalidConnectionUrl(String)
The connection URL could not be parsed.
CouldntSetupConfiguration(Error)
Diesel could not configure the database connection.
Diesel may try to automatically set session specific configuration
values, such as UTF8 encoding, or enabling the ||
operator on MySQL.
This variant is returned if an error occurred executing the query to set
those options. Diesel will never affect global configuration.
Trait Implementations§
source§impl Debug for ConnectionError
impl Debug for ConnectionError
source§impl Display for ConnectionError
impl Display for ConnectionError
source§impl Error for ConnectionError
impl Error for ConnectionError
source§fn cause(&self) -> Option<&dyn StdError>
fn cause(&self) -> Option<&dyn StdError>
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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()
source§impl From<NulError> for ConnectionError
impl From<NulError> for ConnectionError
source§impl PartialEq<ConnectionError> for ConnectionError
impl PartialEq<ConnectionError> for ConnectionError
source§fn eq(&self, other: &ConnectionError) -> bool
fn eq(&self, other: &ConnectionError) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for ConnectionError
Auto Trait Implementations§
impl !RefUnwindSafe for ConnectionError
impl Send for ConnectionError
impl Sync for ConnectionError
impl Unpin for ConnectionError
impl !UnwindSafe for ConnectionError
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
source§impl<T> IntoSql for T
impl<T> IntoSql for T
source§fn into_sql<T>(self) -> AsExprOf<Self, T>where
Self: AsExpression<T> + Sized,
T: SqlType + TypedExpressionType,
fn into_sql<T>(self) -> AsExprOf<Self, T>where Self: AsExpression<T> + Sized, T: SqlType + TypedExpressionType,
Convert
self
to an expression for Diesel’s query builder. Read moresource§fn as_sql<'a, T>(&'a self) -> AsExprOf<&'a Self, T>where
&'a Self: AsExpression<T>,
T: SqlType + TypedExpressionType,
fn as_sql<'a, T>(&'a self) -> AsExprOf<&'a Self, T>where &'a Self: AsExpression<T>, T: SqlType + TypedExpressionType,
Convert
&self
to an expression for Diesel’s query builder. Read more