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 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).