Struct postgres::Error
[−]
[src]
pub struct Error(_);
An error communicating with the Postgres server.
Methods
impl Error
[src]
fn code(&self) -> Option<&SqlState>
Returns the SQLSTATE error code associated with this error if it is a DB error.
fn as_connection(&self) -> Option<&(Error + 'static + Sync + Send)>
Returns the inner error if this is a connection parameter error.
fn as_db(&self) -> Option<&DbError>
Returns the DbError
associated with this error if it is a DB error.
fn as_conversion(&self) -> Option<&(Error + 'static + Sync + Send)>
Returns the inner error if this is a conversion error.
fn as_io(&self) -> Option<&Error>
Returns the inner io::Error
associated with this error if it is an IO
error.
Trait Implementations
impl Display for Error
[src]
impl From<Error> for Error
[src]
impl Error for Error
[src]
fn description(&self) -> &str
A short description of the error. Read more
fn cause(&self) -> Option<&Error>
The lower-level cause of this error, if any. Read more