Struct PostgresqlConnectionConfiguration

Source
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

Source

pub fn application_name(&mut self, name: String) -> &mut Self

Source

pub fn auto_detect_extensions(&mut self, auto_detect: bool) -> &mut Self

Source

pub fn compatibility_mode(&mut self, compatibility_mode: bool) -> &mut Self

Source

pub fn connect_timeout(&mut self, timeout: Duration) -> &mut Self

Source

pub fn database(&mut self, database: String) -> &mut Self

Source

pub fn enable_ssl(&mut self) -> &mut Self

Source

pub fn fetch_size(&mut self, fetch_size: u64) -> &mut Self

Source

pub fn force_binary(&mut self, force_binary: bool) -> &mut Self

Source

pub fn host(&mut self, host: String) -> &mut Self

Source

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.

Source

pub fn password(&mut self, password: String) -> &mut Self

Source

pub fn port(&mut self, port: u32) -> &mut Self

Source

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.

Source

pub fn schema(&mut self, schema: String) -> &mut Self

Source

pub fn socket(&mut self, socket: String) -> &mut Self

Source

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

Source

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

Source

pub fn ssl_mode(&mut self, ssl_mode: SslMode) -> &mut Self

Source

pub fn ssl_password(&mut self, ssl_password: String) -> &mut Self

Source

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

Source

pub fn tcp_keep_alive(&mut self, enabled: bool) -> &mut Self

Source

pub fn tcp_no_delay(&mut self, enabled: bool) -> &mut Self

Source

pub fn username(&mut self, username: String) -> &mut Self

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,