pub enum Error {
Driver(DriverError),
Io(Error),
Connection(ConnectionError),
Other(Cow<'static, str>),
Server(ServerError),
Url(UrlError),
FromSql(FromSqlError),
}Expand description
This type enumerates library errors.
Variants§
Driver(DriverError)
Io(Error)
Connection(ConnectionError)
Other(Cow<'static, str>)
Server(ServerError)
Url(UrlError)
FromSql(FromSqlError)
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)>
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()
Source§impl From<ConnectionError> for Error
impl From<ConnectionError> for Error
Source§fn from(error: ConnectionError) -> Self
fn from(error: ConnectionError) -> Self
Converts to this type from the input type.
Source§impl From<DriverError> for Error
impl From<DriverError> for Error
Source§fn from(err: DriverError) -> Self
fn from(err: DriverError) -> Self
Converts to this type from the input type.
Source§impl From<FromUtf8Error> for Error
impl From<FromUtf8Error> for Error
Source§fn from(err: FromUtf8Error) -> Self
fn from(err: FromUtf8Error) -> Self
Converts to this type from the input type.
Source§impl From<ParseError> for Error
impl From<ParseError> for Error
Source§fn from(err: ParseError) -> Self
fn from(err: ParseError) -> Self
Converts to this type from the input type.
Source§impl From<ServerError> for Error
impl From<ServerError> for Error
Source§fn from(err: ServerError) -> Self
fn from(err: ServerError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for Error
impl !UnwindSafe for Error
impl Forget for Error
impl Freeze for Errorwhere
&'static str: Freeze,
String: Freeze,
*const () is !null: Freeze,
PhantomData<ErrorData<CustomOwner>>: Freeze,
*const u8 is !null: Freeze,
PhantomData<ContentType>: Freeze,
PhantomData<HandshakeType>: Freeze,
*const ArcInner<dyn Error + Sync + Send> is !null: Freeze,
PhantomData<ArcInner<dyn Error + Sync + Send>>: Freeze,
PhantomData<u8>: Freeze,
impl Move for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Errorwhere
&'static str: UnsafeUnpin,
String: UnsafeUnpin,
*const () is !null: UnsafeUnpin,
PhantomData<ErrorData<CustomOwner>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<ContentType>: UnsafeUnpin,
PhantomData<HandshakeType>: UnsafeUnpin,
*const ArcInner<dyn Error + Sync + Send> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn Error + Sync + Send>>: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
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> 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 more