Struct postgres_shared::error::Error [−][src]
pub struct Error(_);
An error communicating with the Postgres server.
Methods
impl Error[src]
impl Errorpub fn code(&self) -> Option<&SqlState>[src]
pub fn code(&self) -> Option<&SqlState>Returns the SQLSTATE error code associated with this error if it is a DB error.
pub fn as_connection(&self) -> Option<&(Error + Sync + Send + 'static)>[src]
pub fn as_connection(&self) -> Option<&(Error + Sync + Send + 'static)>Returns the inner error if this is a connection parameter error.
pub fn as_db(&self) -> Option<&DbError>[src]
pub fn as_db(&self) -> Option<&DbError>Returns the DbError associated with this error if it is a DB error.
pub fn as_conversion(&self) -> Option<&(Error + Sync + Send + 'static)>[src]
pub fn as_conversion(&self) -> Option<&(Error + Sync + Send + 'static)>Returns the inner error if this is a conversion error.
pub fn as_io(&self) -> Option<&Error>[src]
pub fn as_io(&self) -> Option<&Error>Returns the inner io::Error associated with this error if it is an IO
error.
Trait Implementations
impl Debug for Error[src]
impl Debug for Errorfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Display for Error[src]
impl Display for Errorfn fmt(&self, fmt: &mut Formatter) -> Result[src]
fn fmt(&self, fmt: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Error for Error[src]
impl Error for Errorfn description(&self) -> &str[src]
fn description(&self) -> &strThis method is soft-deprecated. Read more
fn cause(&self) -> Option<&Error>[src]
fn cause(&self) -> Option<&Error>The lower-level cause of this error, if any. Read more
impl From<Error> for Error[src]
impl From<Error> for Errorimpl From<Error> for Error[src]
impl From<Error> for Error