pub enum DataSourceError {
ConnectionFailed(String),
QueryFailed(String),
SchemaFailed(String),
UnsupportedOperation(String),
AuthenticationFailed(String),
InvalidConfiguration(String),
Timeout(String),
DataTypeConversion(String),
TransactionFailed(String),
PoolExhausted(String),
}Expand description
Data source connection errors
Variants§
ConnectionFailed(String)
QueryFailed(String)
SchemaFailed(String)
UnsupportedOperation(String)
AuthenticationFailed(String)
InvalidConfiguration(String)
Timeout(String)
DataTypeConversion(String)
TransactionFailed(String)
PoolExhausted(String)
Implementations§
Source§impl DataSourceError
impl DataSourceError
Sourcepub fn connection_failed(message: impl Into<String>) -> Self
pub fn connection_failed(message: impl Into<String>) -> Self
Create a new connection failed error
Sourcepub fn query_failed(message: impl Into<String>) -> Self
pub fn query_failed(message: impl Into<String>) -> Self
Create a new query execution failed error
Sourcepub fn schema_failed(message: impl Into<String>) -> Self
pub fn schema_failed(message: impl Into<String>) -> Self
Create a new schema introspection failed error
Sourcepub fn unsupported_operation(message: impl Into<String>) -> Self
pub fn unsupported_operation(message: impl Into<String>) -> Self
Create a new unsupported operation error
Sourcepub fn authentication_failed(message: impl Into<String>) -> Self
pub fn authentication_failed(message: impl Into<String>) -> Self
Create a new authentication failed error
Sourcepub fn invalid_configuration(message: impl Into<String>) -> Self
pub fn invalid_configuration(message: impl Into<String>) -> Self
Create a new invalid configuration error
Sourcepub fn data_type_conversion(message: impl Into<String>) -> Self
pub fn data_type_conversion(message: impl Into<String>) -> Self
Create a new data type conversion error
Sourcepub fn transaction_failed(message: impl Into<String>) -> Self
pub fn transaction_failed(message: impl Into<String>) -> Self
Create a new transaction failed error
Sourcepub fn pool_exhausted(message: impl Into<String>) -> Self
pub fn pool_exhausted(message: impl Into<String>) -> Self
Create a new connection pool exhausted error
Sourcepub fn is_connection_error(&self) -> bool
pub fn is_connection_error(&self) -> bool
Check if this is a connection error
Sourcepub fn is_query_error(&self) -> bool
pub fn is_query_error(&self) -> bool
Check if this is a query error
Sourcepub fn is_configuration_error(&self) -> bool
pub fn is_configuration_error(&self) -> bool
Check if this is a configuration error
Sourcepub fn is_timeout_error(&self) -> bool
pub fn is_timeout_error(&self) -> bool
Check if this is a timeout error
Sourcepub fn is_transaction_error(&self) -> bool
pub fn is_transaction_error(&self) -> bool
Check if this is a transaction error
Sourcepub fn is_pool_error(&self) -> bool
pub fn is_pool_error(&self) -> bool
Check if this is a pool error
Trait Implementations§
Source§impl Debug for DataSourceError
impl Debug for DataSourceError
Source§impl Display for DataSourceError
impl Display for DataSourceError
Source§impl Error for DataSourceError
impl Error for DataSourceError
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 DataSourceError
impl RefUnwindSafe for DataSourceError
impl Send for DataSourceError
impl Sync for DataSourceError
impl Unpin for DataSourceError
impl UnwindSafe for DataSourceError
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> 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> 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> ⓘ
Converts
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> ⓘ
Converts
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> SerializableKey for T
impl<T> SerializableKey for T
Source§impl<T> StorageAccess<T> for T
impl<T> StorageAccess<T> for T
Source§fn as_borrowed(&self) -> &T
fn as_borrowed(&self) -> &T
Borrows the value.
Source§fn into_taken(self) -> T
fn into_taken(self) -> T
Takes the value.
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read moreSource§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.