pub struct StartupMessage {
pub version: ProtocolVersion,
pub parameters: BTreeMap<String, String>,
pub parameter_pairs: Vec<(String, String)>,
}Fields§
§version: ProtocolVersion§parameters: BTreeMap<String, String>§parameter_pairs: Vec<(String, String)>Startup parameter pairs in wire order, including duplicate names.
Implementations§
Source§impl StartupMessage
impl StartupMessage
pub fn get(&self, key: &str) -> Option<&str>
pub fn user(&self) -> Option<&str>
pub fn database(&self) -> Option<&str>
pub fn application_name(&self) -> Option<&str>
Sourcepub fn negotiate(
&self,
supported_protocol_options: &[&str],
) -> Result<StartupNegotiation, PgWireError>
pub fn negotiate( &self, supported_protocol_options: &[&str], ) -> Result<StartupNegotiation, PgWireError>
Negotiate a PostgreSQL 3.x minor version and report every _pq_.
startup option the embedding server has not implemented.
Sourcepub fn negotiate_with_max(
&self,
newest_supported: ProtocolVersion,
supported_protocol_options: &[&str],
) -> Result<StartupNegotiation, PgWireError>
pub fn negotiate_with_max( &self, newest_supported: ProtocolVersion, supported_protocol_options: &[&str], ) -> Result<StartupNegotiation, PgWireError>
Negotiate against the newest protocol version implemented by the embedding server.
Trait Implementations§
Source§impl Clone for StartupMessage
impl Clone for StartupMessage
Source§fn clone(&self) -> StartupMessage
fn clone(&self) -> StartupMessage
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StartupMessage
impl Debug for StartupMessage
impl Eq for StartupMessage
Source§impl PartialEq for StartupMessage
impl PartialEq for StartupMessage
impl StructuralPartialEq for StartupMessage
Auto Trait Implementations§
impl Freeze for StartupMessage
impl RefUnwindSafe for StartupMessage
impl Send for StartupMessage
impl Sync for StartupMessage
impl Unpin for StartupMessage
impl UnsafeUnpin for StartupMessage
impl UnwindSafe for StartupMessage
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