pub enum BackendMessage {
Show 24 variants
AuthenticationOk,
AuthenticationMD5Password([u8; 4]),
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,
CopyInResponse {
format: u8,
column_formats: Vec<u8>,
},
CopyOutResponse {
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.
AuthenticationMD5Password([u8; 4])
Server requests MD5-hashed password; salt provided.
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).
CopyInResponse
Copy in response (server ready to receive COPY data)
Fields
CopyOutResponse
Copy out response (server will send COPY data)
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