pub struct ConnectOptions {
pub tls_mode: TlsMode,
pub gss_enc_mode: GssEncMode,
pub tls_ca_cert_pem: Option<Vec<u8>>,
pub mtls: Option<TlsConfig>,
pub gss_token_provider: Option<GssTokenProvider>,
pub gss_token_provider_ex: Option<GssTokenProviderEx>,
pub auth: AuthSettings,
pub startup_params: Vec<(String, String)>,
}Expand description
Advanced connection options for enterprise deployments.
Protocol-version controls are intentionally not exposed here in this milestone. The driver requests protocol 3.2 by default and performs a one-shot fallback to protocol 3.0 only on explicit version rejection.
Fields§
§tls_mode: TlsModeTLS mode for the primary connection.
gss_enc_mode: GssEncModeGSSAPI session encryption mode.
tls_ca_cert_pem: Option<Vec<u8>>Optional custom CA bundle (PEM) for TLS server validation.
mtls: Option<TlsConfig>Optional mTLS client certificate/key config.
gss_token_provider: Option<GssTokenProvider>Optional callback for Kerberos/GSS/SSPI token generation.
gss_token_provider_ex: Option<GssTokenProviderEx>Optional stateful Kerberos/GSS/SSPI token provider.
auth: AuthSettingsPassword-auth policy.
startup_params: Vec<(String, String)>Additional startup parameters sent in StartupMessage.
Example: replication=database for logical replication mode.
Implementations§
Source§impl ConnectOptions
impl ConnectOptions
Sourcepub fn with_startup_param(
self,
key: impl Into<String>,
value: impl Into<String>,
) -> Self
pub fn with_startup_param( self, key: impl Into<String>, value: impl Into<String>, ) -> Self
Add a startup parameter.
Example: opts.with_startup_param("application_name", "qail-repl").
Sourcepub fn with_logical_replication(self) -> Self
pub fn with_logical_replication(self) -> Self
Enable logical replication startup mode (replication=database).
Trait Implementations§
Source§impl Clone for ConnectOptions
impl Clone for ConnectOptions
Source§fn clone(&self) -> ConnectOptions
fn clone(&self) -> ConnectOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more