pub enum BackendMessage {
Show 27 variants
AuthenticationOk,
AuthenticationCleartextPassword,
AuthenticationMd5Password([u8; 4]),
AuthenticationSasl(Vec<String>),
AuthenticationSaslContinue(Bytes),
AuthenticationSaslFinal(Bytes),
BackendKeyData {
pid: i32,
secret_key: i32,
},
ParameterStatus {
name: String,
value: String,
},
ReadyForQuery(u8),
RowDescription(Vec<FieldDescription>),
ParameterDescription(Vec<Oid>),
DataRow(Bytes),
CommandComplete(Bytes),
ParseComplete,
BindComplete,
CloseComplete,
NoData,
PortalSuspended,
EmptyQueryResponse,
ErrorResponse(DbError),
NoticeResponse(DbError),
NotificationResponse {
pid: i32,
channel: String,
payload: String,
},
CopyInResponse {
format: u8,
column_formats: Vec<i16>,
},
CopyOutResponse {
format: u8,
column_formats: Vec<i16>,
},
CopyData(Bytes),
CopyDone,
NegotiateProtocolVersion {
newest_minor: i32,
unsupported: Vec<String>,
},
}Expand description
A decoded backend message.
Variants§
AuthenticationOk
Authentication succeeded.
AuthenticationCleartextPassword
Server requests a cleartext password.
AuthenticationMd5Password([u8; 4])
Server requests an MD5 password, with a 4-byte salt.
AuthenticationSasl(Vec<String>)
Server offers SASL mechanisms.
AuthenticationSaslContinue(Bytes)
SASL challenge.
AuthenticationSaslFinal(Bytes)
SASL completion.
BackendKeyData
Backend process id and secret key, for query cancellation.
ParameterStatus
A run-time parameter (e.g. server_version, integer_datetimes).
ReadyForQuery(u8)
The connection is ready for a new query.
RowDescription(Vec<FieldDescription>)
Description of the columns a statement or portal will return.
ParameterDescription(Vec<Oid>)
The parameter types a prepared statement expects.
DataRow(Bytes)
One result row; the payload starts with the column count.
CommandComplete(Bytes)
A statement completed, with its command tag.
ParseComplete
A Parse completed.
BindComplete
A Bind completed.
CloseComplete
A Close completed.
NoData
The statement/portal returns no rows.
PortalSuspended
A portal was suspended by the row limit.
EmptyQueryResponse
An empty query string produced no command.
ErrorResponse(DbError)
The server reported an error for the current request.
NoticeResponse(DbError)
A non-fatal notice, to be logged.
NotificationResponse
An asynchronous NOTIFY.
Fields
CopyInResponse
The server is ready to receive COPY ... FROM STDIN data.
CopyOutResponse
The server will stream COPY ... TO STDOUT data.
CopyData(Bytes)
A chunk of COPY data.
CopyDone
The server finished streaming COPY data.
NegotiateProtocolVersion
The server advertises protocol version negotiation.