pub enum FrontendMessage {
Startup {
user: String,
database: String,
},
PasswordMessage(String),
Query(String),
Parse {
name: String,
query: String,
param_types: Vec<u32>,
},
Bind {
portal: String,
statement: String,
params: Vec<Option<Vec<u8>>>,
},
Execute {
portal: String,
max_rows: i32,
},
Sync,
Terminate,
SASLInitialResponse {
mechanism: String,
data: Vec<u8>,
},
SASLResponse(Vec<u8>),
CopyFail(String),
Close {
is_portal: bool,
name: String,
},
}Expand description
Frontend (client → server) message types
Variants§
Startup
Startup message (sent first, no type byte)
PasswordMessage(String)
Password response (MD5 or cleartext).
Query(String)
Simple query (SQL text).
Parse
Parse (prepared statement)
Fields
Bind
Bind parameters to prepared statement
Fields
Execute
Execute portal
Sync
Sync — marks the end of an extended-query pipeline.
Terminate
Terminate — closes the connection.
SASLInitialResponse
SASL initial response (first message in SCRAM)
Fields
SASLResponse(Vec<u8>)
SASL response (subsequent messages in SCRAM)
CopyFail(String)
CopyFail — abort a COPY IN with an error message
Close
Close — explicitly release a prepared statement or portal
Implementations§
Trait Implementations§
Source§impl Clone for FrontendMessage
impl Clone for FrontendMessage
Source§fn clone(&self) -> FrontendMessage
fn clone(&self) -> FrontendMessage
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for FrontendMessage
impl RefUnwindSafe for FrontendMessage
impl Send for FrontendMessage
impl Sync for FrontendMessage
impl Unpin for FrontendMessage
impl UnsafeUnpin for FrontendMessage
impl UnwindSafe for FrontendMessage
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more