pub struct PoolOptions { /* private fields */ }Expand description
How the pool behaves, and the roots TLS connections are verified against.
Builder style: PoolOptions::new().max_size(4).tls_root_certificates_pem(&pem)?.
Implementations§
Source§impl PoolOptions
impl PoolOptions
Sourcepub fn new() -> PoolOptions
pub fn new() -> PoolOptions
At most 8 connections; wait at most 30 seconds for one; TLS connections verified
against the Mozilla roots (webpki-roots).
Sourcepub fn barrier_timeout(self, d: Duration) -> PoolOptions
pub fn barrier_timeout(self, d: Duration) -> PoolOptions
How long a barrier (Store::barrier) waits for a version writer in flight
before it fails with Error::Timeout (the http layer answers 503). Default
5 s. On PostgreSQL the barrier is one statement under lock_timeout of this value. Since 0.6.5.
Sourcepub fn recording_clock(self, clock: RecordingClock) -> PoolOptions
pub fn recording_clock(self, clock: RecordingClock) -> PoolOptions
The clock the store records its versions at (G9, RecordingClock): read at each insert,
recorded = max(signed tx, clock()). Without one a version is recorded at its signed tx.
Since 0.6.5.
Sourcepub fn max_size(self, n: usize) -> PoolOptions
pub fn max_size(self, n: usize) -> PoolOptions
The most connections open at once (at least 1).
Sourcepub fn checkout_timeout(self, d: Duration) -> PoolOptions
pub fn checkout_timeout(self, d: Duration) -> PoolOptions
How long a call waits for a free connection before failing with
Error::PoolTimeout (reads: None).
Sourcepub fn tls_root_certificates_pem(self, pem: &[u8]) -> Result<PoolOptions>
pub fn tls_root_certificates_pem(self, pem: &[u8]) -> Result<PoolOptions>
Adds the certificates of a PEM bundle (one or more CERTIFICATE sections; other
sections are ignored) to the roots TLS connections are verified against: a private
CA, or a server’s self-signed certificate. Calls append. A bundle with no
certificate, or with one that does not parse, is Error::Config.
Sourcepub fn tls_webpki_roots(self, yes: bool) -> PoolOptions
pub fn tls_webpki_roots(self, yes: bool) -> PoolOptions
Whether the Mozilla roots (webpki-roots, compiled in) are trusted too: yes by
default. false trusts only the roots added with
tls_root_certificates_pem (a private CA).