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.
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
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 moreSource§impl Debug for ConnectOptions
impl Debug for ConnectOptions
Source§impl Default for ConnectOptions
impl Default for ConnectOptions
Source§fn default() -> ConnectOptions
fn default() -> ConnectOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ConnectOptions
impl !RefUnwindSafe for ConnectOptions
impl Send for ConnectOptions
impl Sync for ConnectOptions
impl Unpin for ConnectOptions
impl UnsafeUnpin for ConnectOptions
impl !UnwindSafe for ConnectOptions
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