Struct fibers_http_client::connection::ConnectionPoolBuilder [−][src]
pub struct ConnectionPoolBuilder { /* fields omitted */ }
ConnectionPool
builder.
Methods
impl ConnectionPoolBuilder
[src]
impl ConnectionPoolBuilder
pub fn new() -> Self
[src]
pub fn new() -> Self
Makes a new ConnectionPoolBuilder
instance with the default settings.
ⓘImportant traits for &'a mut Rpub fn max_pool_size(&mut self, size: usize) -> &mut Self
[src]
ⓘImportant traits for &'a mut R
pub fn max_pool_size(&mut self, size: usize) -> &mut Self
Sets the maximum size (i.e., the number of connections) of the pool.
The default value is 4096
.
ⓘImportant traits for &'a mut Rpub fn connect_timeout(&mut self, timeout: Duration) -> &mut Self
[src]
ⓘImportant traits for &'a mut R
pub fn connect_timeout(&mut self, timeout: Duration) -> &mut Self
Sets the timeout duration of TCP connect operation issued by the pool.
The default value is Duration::from_secs(5)
.
ⓘImportant traits for &'a mut Rpub fn keepalive_timeout(&mut self, timeout: Duration) -> &mut Self
[src]
ⓘImportant traits for &'a mut R
pub fn keepalive_timeout(&mut self, timeout: Duration) -> &mut Self
Sets the retention duration of a pooled (inactive) connection.
If a connection is inactive (i.e., unused by any clients) beyond the duration, it will removed from the pool.
The default value is Duration::from_secs(10)
.
ⓘImportant traits for &'a mut Rpub fn metrics(&mut self, metrics: MetricBuilder) -> &mut Self
[src]
ⓘImportant traits for &'a mut R
pub fn metrics(&mut self, metrics: MetricBuilder) -> &mut Self
Sets the metrics builder used by the pool.
The default value is MetricBuilder::new()
.
pub fn finish<S>(&self, spawner: S) -> ConnectionPool where
S: Spawn + Send + 'static,
[src]
pub fn finish<S>(&self, spawner: S) -> ConnectionPool where
S: Spawn + Send + 'static,
Makes a new ConnectionPool
instance with the given settings.
Trait Implementations
impl Debug for ConnectionPoolBuilder
[src]
impl Debug for ConnectionPoolBuilder
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Default for ConnectionPoolBuilder
[src]
impl Default for ConnectionPoolBuilder
Auto Trait Implementations
impl Send for ConnectionPoolBuilder
impl Send for ConnectionPoolBuilder
impl !Sync for ConnectionPoolBuilder
impl !Sync for ConnectionPoolBuilder