Struct pg_async::PgSqlErr

source ·
pub struct PgSqlErr {
    pub num: u32,
    pub status: &'static str,
    pub sqlstate: String,
    pub message: String,
    /* private fields */
}
Expand description

The part of PgFutureErr that’s used when the SQL fails.

Fields

num: u32

Which statement has failed.

In a single-statement ops this is usually 0 for the statement itself or 1 for the COMMIT.

status: &'static str

Returned by PQresStatus, “string constant describing the status code”.

sqlstate: String

The SQLSTATE code identifies the type of error that has occurred; it can be used by front-end applications to perform specific operations (such as error handling) in response to a particular database error. cf. https://www.postgresql.org/docs/9.4/static/errcodes-appendix.html

message: String

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.