pub struct Error(/* private fields */);
Expand description
public facing error type. providing basic format and display based error handling.
for typed based error handling runtime type cast is needed with the help of other public error types offered by this module.
§Example
use xitca_postgres::error::{DriverDown, Error};
fn is_driver_down(e: Error) -> bool {
// downcast error to DriverDown error type to check if client driver is gone.
e.downcast_ref::<DriverDown>().is_some()
}
Implementations§
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<AuthenticationError> for Error
impl From<AuthenticationError> for Error
Source§fn from(e: AuthenticationError) -> Self
fn from(e: AuthenticationError) -> Self
Converts to this type from the input type.
Source§impl From<ConfigError> for Error
impl From<ConfigError> for Error
Source§fn from(e: ConfigError) -> Self
fn from(e: ConfigError) -> Self
Converts to this type from the input type.
Source§impl From<DriverDown> for Error
impl From<DriverDown> for Error
Source§fn from(e: DriverDown) -> Self
fn from(e: DriverDown) -> Self
Converts to this type from the input type.
Source§impl From<DriverDownReceiving> for Error
impl From<DriverDownReceiving> for Error
Source§fn from(e: DriverDownReceiving) -> Self
fn from(e: DriverDownReceiving) -> Self
Converts to this type from the input type.
Source§impl From<DriverIoErrorMulti> for Error
impl From<DriverIoErrorMulti> for Error
Source§fn from(e: DriverIoErrorMulti) -> Self
fn from(e: DriverIoErrorMulti) -> Self
Converts to this type from the input type.
Source§impl From<FeatureError> for Error
impl From<FeatureError> for Error
Source§fn from(e: FeatureError) -> Self
fn from(e: FeatureError) -> Self
Converts to this type from the input type.
Source§impl From<Infallible> for Error
impl From<Infallible> for Error
Source§fn from(e: Infallible) -> Self
fn from(e: Infallible) -> Self
Converts to this type from the input type.
Source§impl From<InvalidColumnIndex> for Error
impl From<InvalidColumnIndex> for Error
Source§fn from(e: InvalidColumnIndex) -> Self
fn from(e: InvalidColumnIndex) -> Self
Converts to this type from the input type.
Source§impl From<InvalidParamCount> for Error
impl From<InvalidParamCount> for Error
Source§fn from(e: InvalidParamCount) -> Self
fn from(e: InvalidParamCount) -> Self
Converts to this type from the input type.
Source§impl From<RuntimeError> for Error
impl From<RuntimeError> for Error
Source§fn from(e: RuntimeError) -> Self
fn from(e: RuntimeError) -> Self
Converts to this type from the input type.
Source§impl From<SystemError> for Error
impl From<SystemError> for Error
Source§fn from(e: SystemError) -> Self
fn from(e: SystemError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
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