pub struct PostgresqlConnectionConfiguration {Show 23 fields
pub application_name: String,
pub auto_detect_extensions: bool,
pub compatibility_mode: bool,
pub connection_timeout: Duration,
pub database: String,
pub fetch_size: u64,
pub force_binary: bool,
pub host: String,
pub options: HashMap<String, String>,
pub password: String,
pub port: u32,
pub prepared_statement_cache_queries: i32,
pub schema: String,
pub socket: String,
pub ssl_cert: Option<Url>,
pub ssl_key: Option<Url>,
pub ssl_mode: SslMode,
pub ssl_password: String,
pub ssl_root_cert: Option<Url>,
pub statement_timeout: Duration,
pub tcp_keep_alive: bool,
pub tcp_no_delay: bool,
pub username: String,
}
Fields§
§application_name: String
§auto_detect_extensions: bool
§compatibility_mode: bool
§connection_timeout: Duration
§database: String
§fetch_size: u64
§force_binary: bool
§host: String
§options: HashMap<String, String>
§password: String
§port: u32
§prepared_statement_cache_queries: i32
§schema: String
§socket: String
§ssl_cert: Option<Url>
§ssl_key: Option<Url>
§ssl_mode: SslMode
§ssl_password: String
§ssl_root_cert: Option<Url>
§statement_timeout: Duration
§tcp_keep_alive: bool
§tcp_no_delay: bool
§username: String
Implementations§
Source§impl PostgresqlConnectionConfiguration
impl PostgresqlConnectionConfiguration
pub fn application_name(&mut self, name: String) -> &mut Self
pub fn auto_detect_extensions(&mut self, auto_detect: bool) -> &mut Self
pub fn compatibility_mode(&mut self, compatibility_mode: bool) -> &mut Self
pub fn connect_timeout(&mut self, timeout: Duration) -> &mut Self
pub fn database(&mut self, database: String) -> &mut Self
pub fn enable_ssl(&mut self) -> &mut Self
pub fn fetch_size(&mut self, fetch_size: u64) -> &mut Self
pub fn force_binary(&mut self, force_binary: bool) -> &mut Self
pub fn host(&mut self, host: String) -> &mut Self
Sourcepub fn options(&mut self, options: HashMap<String, String>) -> &mut Self
pub fn options(&mut self, options: HashMap<String, String>) -> &mut Self
Configure connection initialization parameters.
These parameters are applied once after creating a new connection. This is useful for setting up client-specific runtime parameters like statement timeouts, time zones etc.
pub fn password(&mut self, password: String) -> &mut Self
pub fn port(&mut self, port: u32) -> &mut Self
Sourcepub fn prepared_statement_cache_queries(
&mut self,
prepared_statement_cache_queries: i32,
) -> &mut Self
pub fn prepared_statement_cache_queries( &mut self, prepared_statement_cache_queries: i32, ) -> &mut Self
Configure the preparedStatementCacheQueries. The default is {@code -1}, meaning there’s no limit. The value of {@code 0} disables the cache. Any other value specifies the cache size.
pub fn schema(&mut self, schema: String) -> &mut Self
pub fn socket(&mut self, socket: String) -> &mut Self
Sourcepub fn ssl_url(&mut self, ssl_cert: Url) -> &mut Self
pub fn ssl_url(&mut self, ssl_cert: Url) -> &mut Self
Configure ssl cert for client certificate authentication.
sslCert an X.509 certificate chain file in PEM format
Sourcepub fn sslkey_url(&mut self, sslkey: Url) -> &mut Self
pub fn sslkey_url(&mut self, sslkey: Url) -> &mut Self
Configure ssl key for client certificate authentication.
sslKey a PKCS#8 private key file in PEM format
pub fn ssl_mode(&mut self, ssl_mode: SslMode) -> &mut Self
pub fn ssl_password(&mut self, ssl_password: String) -> &mut Self
Sourcepub fn ssl_root_cert_url(&mut self, ssl_root_cert: Url) -> &mut Self
pub fn ssl_root_cert_url(&mut self, ssl_root_cert: Url) -> &mut Self
Configure ssl root cert for server certificate validation.
sslRootCert an X.509 certificate chain file in PEM format
pub fn tcp_keep_alive(&mut self, enabled: bool) -> &mut Self
pub fn tcp_no_delay(&mut self, enabled: bool) -> &mut Self
pub fn username(&mut self, username: String) -> &mut Self
Auto Trait Implementations§
impl Freeze for PostgresqlConnectionConfiguration
impl RefUnwindSafe for PostgresqlConnectionConfiguration
impl Send for PostgresqlConnectionConfiguration
impl Sync for PostgresqlConnectionConfiguration
impl Unpin for PostgresqlConnectionConfiguration
impl UnwindSafe for PostgresqlConnectionConfiguration
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