pub fn from_config(manager: M, config: PoolConfig) -> Pool<M, W> {
        Pool {
            inner: Arc::new(PoolInner {
                manager: Box::new(manager),
                queue: std::sync::Mutex::new(Vec::with_capacity(config.max_size)),
                size: AtomicUsize::new(0),
                available: AtomicIsize::new(0),
                semaphore: Semaphore::new(config.max_size),
                config,
            }),
            _wrapper: PhantomData::default(),
        }
    }
/// Create new connection pool with a given `manager` and `config`.
/// The `manager` is used to create and recycle objects. The config
/// specifies the maximum numbers of objects to be created and
/// timeouts.
Create new connection pool with a given `manager` and `config`.
The `manager` is used to create and recycle objects. The config
specifies the maximum numbers of objects to be created and
timeouts.
Create new connection pool with a given ` manager ` and ` config ` . The ` manager ` is used to create and recycle objects . The config specifies the maximum numbers of objects to be created and timeouts .
pub fn from_config(manager: M, config: PoolConfig) -> Pool<M, W> {
        Pool {
            inner: Arc::new(PoolInner {
                manager: Box::new(manager),
                queue: std::sync::Mutex::new(Vec::with_capacity(config.max_size)),
                size: AtomicUsize::new(0),
                available: AtomicIsize::new(0),
                semaphore: Semaphore::new(config.max_size),
                config,
            }),
            _wrapper: PhantomData::default(),
        }
    }
pub fn from_config ( manager : M , config : PoolConfig ) -> Pool < M , W > { Pool { inner : Arc :: new ( PoolInner { manager : Box :: new ( manager ) , queue : std :: sync :: Mutex :: new ( Vec :: with_capacity ( config . max_size ) ) , size : AtomicUsize :: new ( 0 ) , available : AtomicIsize :: new ( 0 ) , semaphore : Semaphore :: new ( config . max_size ) , config , } ) , _wrapper : PhantomData :: default ( ) , } }
Create new connection pool with a given `manager` and `config`.
Create new connection pool with a given ` manager ` and ` config ` .
manager
M
config
PoolConfig
manager
M
config
PoolConfig