pub enum BackendMessage {
Show 32 variants
AuthenticationOk,
AuthenticationCleartextPassword,
AuthenticationMD5Password([u8; 4]),
AuthenticationKerberosV5,
AuthenticationGSS,
AuthenticationSCMCredential,
AuthenticationGSSContinue(Vec<u8>),
AuthenticationSSPI,
AuthenticationSASL(Vec<String>),
AuthenticationSASLContinue(Vec<u8>),
AuthenticationSASLFinal(Vec<u8>),
ParameterStatus {
name: String,
value: String,
},
BackendKeyData {
process_id: i32,
secret_key: i32,
},
ReadyForQuery(TransactionStatus),
RowDescription(Vec<FieldDescription>),
DataRow(Vec<Option<Vec<u8>>>),
CommandComplete(String),
ErrorResponse(ErrorFields),
ParseComplete,
BindComplete,
NoData,
PortalSuspended,
CopyInResponse {
format: u8,
column_formats: Vec<u8>,
},
CopyOutResponse {
format: u8,
column_formats: Vec<u8>,
},
CopyBothResponse {
format: u8,
column_formats: Vec<u8>,
},
CopyData(Vec<u8>),
CopyDone,
NotificationResponse {
process_id: i32,
channel: String,
payload: String,
},
EmptyQueryResponse,
NoticeResponse(ErrorFields),
ParameterDescription(Vec<u32>),
CloseComplete,
}Expand description
Backend (server → client) message types
Variants§
AuthenticationOk
Authentication request Authentication succeeded.
AuthenticationCleartextPassword
Server requests cleartext password.
AuthenticationMD5Password([u8; 4])
Server requests MD5-hashed password; salt provided.
AuthenticationKerberosV5
Server requests Kerberos V5 authentication.
AuthenticationGSS
Server requests GSSAPI authentication.
AuthenticationSCMCredential
Server requests SCM credential auth (Unix-domain peer credential exchange).
PostgreSQL auth code 6. This is typically used with local Unix sockets
and requires ancillary credential passing at the socket layer.
AuthenticationGSSContinue(Vec<u8>)
Server sends GSSAPI/SSPI continuation token.
AuthenticationSSPI
Server requests SSPI authentication.
AuthenticationSASL(Vec<String>)
Server initiates SASL handshake with supported mechanisms.
AuthenticationSASLContinue(Vec<u8>)
SASL challenge from server.
AuthenticationSASLFinal(Vec<u8>)
SASL authentication complete; final server data.
ParameterStatus
Parameter status (server config)
Fields
BackendKeyData
Backend key data (for cancel)
Fields
ReadyForQuery(TransactionStatus)
Server is ready; transaction state indicated.
RowDescription(Vec<FieldDescription>)
Column metadata for the upcoming data rows.
DataRow(Vec<Option<Vec<u8>>>)
One data row; each element is None for SQL NULL or the raw bytes.
CommandComplete(String)
Command completed with a tag like SELECT 5 or INSERT 0 1.
ErrorResponse(ErrorFields)
Error response with structured fields (severity, code, message, etc.).
ParseComplete
Parse step succeeded.
BindComplete
Bind step succeeded.
NoData
Describe returned no row description (e.g. for DML statements).
PortalSuspended
Execute reached row limit (max_rows) and suspended the portal.
CopyInResponse
Copy in response (server ready to receive COPY data)
Fields
CopyOutResponse
Copy out response (server will send COPY data)
Fields
CopyBothResponse
Copy both response (used by streaming replication).
Fields
CopyData(Vec<u8>)
Raw COPY data chunk from the server.
CopyDone
COPY transfer complete.
NotificationResponse
Notification response (async notification from LISTEN/NOTIFY)
Fields
EmptyQueryResponse
Empty query string was submitted.
NoticeResponse(ErrorFields)
Notice response (warning/info messages, not errors)
ParameterDescription(Vec<u32>)
Parameter description (OIDs of parameters in a prepared statement) Sent by server in response to Describe(Statement)
CloseComplete
Close complete (server confirmation that a prepared statement/portal was released)
Implementations§
Trait Implementations§
Source§impl Clone for BackendMessage
impl Clone for BackendMessage
Source§fn clone(&self) -> BackendMessage
fn clone(&self) -> BackendMessage
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more