pub struct PostgresSettings {
pub hosts: Vec<String>,
pub port: u16,
pub dbname: String,
pub user: String,
pub ca_file: Option<PathBuf>,
pub password_file: Option<PathBuf>,
pub client_cert_file: Option<PathBuf>,
pub client_key_file: Option<PathBuf>,
pub pool: u32,
pub connect_timeout: Duration,
pub statement_timeout: Duration,
pub lock_timeout: Duration,
}Expand description
How to reach the PostgreSQL database: the [catalog.postgres] table.
TLS, with the server’s certificate chain and host name verified, is the
only way it is reached.
Fields§
§hosts: Vec<String>The servers’ host names or IP addresses, tried in order.
port: u16The TCP port of every host.
dbname: StringThe database.
user: StringThe role the server logs in as.
ca_file: Option<PathBuf>PEM certificates of the authorities trusted for the servers’ TLS certificates, in place of the system’s; None trusts the system’s.
password_file: Option<PathBuf>The file holding the role’s password, for SCRAM with channel binding.
client_cert_file: Option<PathBuf>The file holding the PEM client certificate chain.
client_key_file: Option<PathBuf>The file holding the client certificate’s PEM private key.
pool: u32The most connections open at once.
connect_timeout: DurationHow long a connection, or a wait for a free one, may take.
statement_timeout: DurationThe longest a statement may run (PostgreSQL’s statement_timeout).
lock_timeout: DurationThe longest a statement may wait for a lock (lock_timeout).
Trait Implementations§
Source§impl Clone for PostgresSettings
impl Clone for PostgresSettings
Source§impl Debug for PostgresSettings
impl Debug for PostgresSettings
impl Eq for PostgresSettings
Source§impl PartialEq for PostgresSettings
impl PartialEq for PostgresSettings
impl StructuralPartialEq for PostgresSettings
Auto Trait Implementations§
impl Forget for PostgresSettings
impl Freeze for PostgresSettings
impl RefUnwindSafe for PostgresSettings
impl Send for PostgresSettings
impl Sync for PostgresSettings
impl Unpin for PostgresSettings
impl UnsafeUnpin for PostgresSettings
impl UnwindSafe for PostgresSettings
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more