pub struct PoolConfig {
pub max_concurrent: usize,
pub acquire_timeout_ms: u64,
pub enable_metrics: bool,
}Expand description
Configuration for the connection pool
Fields§
§max_concurrent: usizeMaximum number of concurrent operations
acquire_timeout_ms: u64Timeout for acquiring a pool permit (milliseconds)
enable_metrics: boolEnable detailed metrics collection
Implementations§
Source§impl PoolConfig
impl PoolConfig
Sourcepub fn with_max_concurrent(self, max: usize) -> Self
pub fn with_max_concurrent(self, max: usize) -> Self
Set maximum concurrent operations
Sourcepub fn with_timeout(self, timeout_ms: u64) -> Self
pub fn with_timeout(self, timeout_ms: u64) -> Self
Set acquire timeout in milliseconds
Sourcepub fn with_metrics(self, enable: bool) -> Self
pub fn with_metrics(self, enable: bool) -> Self
Enable or disable metrics
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 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