Struct tokio_postgres::error::Error [−][src]
pub struct Error(_);
An error communicating with the Postgres server.
Implementations
impl Error
[src]
impl Error
[src]pub fn into_source(self) -> Option<Box<dyn Error + Sync + Send>>
[src]
Consumes the error, returning its cause.
pub fn as_db_error(&self) -> Option<&DbError>
[src]
Returns the source of this error if it was a DbError
.
This is a simple convenience method.
pub fn is_closed(&self) -> bool
[src]
Determines if the error was associated with closed connection.
pub fn code(&self) -> Option<&SqlState>
[src]
Returns the SQLSTATE error code associated with the error.
This is a convenience method that downcasts the cause to a DbError
and returns its code.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Error
impl !RefUnwindSafe for Error
impl !UnwindSafe for Error
impl !UnwindSafe for Error