pub struct PoolConfigBuilder { /* private fields */ }Expand description
Builder for PoolConfig.
Implementations§
Source§impl PoolConfigBuilder
impl PoolConfigBuilder
Sourcepub fn max_connections_per_host(self, max: usize) -> Self
pub fn max_connections_per_host(self, max: usize) -> Self
Sets the maximum connections per host.
Sourcepub fn max_total_connections(self, max: usize) -> Self
pub fn max_total_connections(self, max: usize) -> Self
Sets the maximum total connections.
Sourcepub fn idle_timeout(self, timeout: Duration) -> Self
pub fn idle_timeout(self, timeout: Duration) -> Self
Sets the idle connection timeout.
Sourcepub fn cleanup_interval(self, interval: Duration) -> Self
pub fn cleanup_interval(self, interval: Duration) -> Self
Sets the cleanup interval.
Sourcepub fn build(self) -> PoolConfig
pub fn build(self) -> PoolConfig
Builds the configuration.
Trait Implementations§
Source§impl Debug for PoolConfigBuilder
impl Debug for PoolConfigBuilder
Source§impl Default for PoolConfigBuilder
impl Default for PoolConfigBuilder
Source§fn default() -> PoolConfigBuilder
fn default() -> PoolConfigBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for PoolConfigBuilder
impl RefUnwindSafe for PoolConfigBuilder
impl Send for PoolConfigBuilder
impl Sync for PoolConfigBuilder
impl Unpin for PoolConfigBuilder
impl UnsafeUnpin for PoolConfigBuilder
impl UnwindSafe for PoolConfigBuilder
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
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).