pub struct PoolConfig {
pub min_size: usize,
pub max_size: usize,
pub idle_timeout: Duration,
pub max_lifetime: Duration,
pub max_waiters: usize,
pub circuit_breaker_threshold: usize,
pub circuit_breaker_timeout: Duration,
}Expand description
Configuration for connection pooling
Fields§
§min_size: usizeMinimum connections to maintain (pre-warmed)
max_size: usizeMaximum connections in pool
idle_timeout: DurationTime-to-live for idle connections before eviction
max_lifetime: DurationMaximum lifetime of a connection regardless of idle time
max_waiters: usizeMaximum concurrent waiters for connections (backpressure limit)
circuit_breaker_threshold: usizeCircuit breaker: consecutive failures before opening
circuit_breaker_timeout: DurationCircuit breaker: time to wait before trying again
Implementations§
Trait Implementations§
Source§impl Clone for PoolConfig
impl Clone for PoolConfig
Source§fn clone(&self) -> PoolConfig
fn clone(&self) -> PoolConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PoolConfig
impl Debug for PoolConfig
Auto Trait Implementations§
impl Freeze for PoolConfig
impl RefUnwindSafe for PoolConfig
impl Send for PoolConfig
impl Sync for PoolConfig
impl Unpin for PoolConfig
impl UnsafeUnpin for PoolConfig
impl UnwindSafe for PoolConfig
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