pub struct PoolConfig {
pub max_pool_size: usize,
pub enable_statistics: bool,
pub auto_clear_threshold: Option<usize>,
pub prewarm_capacities: Vec<usize>,
}Expand description
Configuration for pool initialization
Fields§
§max_pool_size: usizeMaximum number of containers per capacity bucket
enable_statistics: boolEnable detailed statistics tracking
auto_clear_threshold: Option<usize>Automatically clear pools when this many containers are stored
prewarm_capacities: Vec<usize>Pre-warm pools with containers of these capacities
Implementations§
Source§impl PoolConfig
impl PoolConfig
Sourcepub fn test() -> Self
pub fn test() -> Self
Create a configuration optimized for testing Uses smaller pools to catch memory issues faster
Sourcepub fn production() -> Self
pub fn production() -> Self
Create a configuration optimized for production Uses larger pools and pre-warming for better performance
Sourcepub fn development() -> Self
pub fn development() -> Self
Create a configuration for development Balance between test and production
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