pub fn build(self, manager: M) -> Pool<M> {
        use std::cmp;
        let max_idle = self
            .max_idle
            .unwrap_or_else(|| cmp::min(self.max_open, DEFAULT_MAX_IDLE_CONNS));

        assert!(
            self.max_open >= max_idle,
            "max_idle must be no larger than max_open"
        );

        let config = Config {
            max_open: self.max_open,
            max_idle,
            max_lifetime: self.max_lifetime,
            max_idle_lifetime: self.max_idle_lifetime,
            get_timeout: self.get_timeout,
            clean_rate: self.clean_rate,
            max_bad_conn_retries: self.max_bad_conn_retries,
            health_check: self.health_check,
            health_check_interval: self.health_check_interval,
        };

        Pool::new_inner(manager, config)
    }
/// Consumes the builder, returning a new, initialized pool.
///
/// # Panics
///
/// Panics if `max_idle` is greater than `max_size`.
Consumes the builder, returning a new, initialized pool.
Consumes the builder returning a new initialized pool .
pub fn build(self, manager: M) -> Pool<M> {
        use std::cmp;
        let max_idle = self
            .max_idle
            .unwrap_or_else(|| cmp::min(self.max_open, DEFAULT_MAX_IDLE_CONNS));
        assert!(
            self.max_open >= max_idle,
            "max_idle must be no larger than max_open"
        );
        let config = Config {
            max_open: self.max_open,
            max_idle,
            max_lifetime: self.max_lifetime,
            max_idle_lifetime: self.max_idle_lifetime,
            get_timeout: self.get_timeout,
            clean_rate: self.clean_rate,
            max_bad_conn_retries: self.max_bad_conn_retries,
            health_check: self.health_check,
            health_check_interval: self.health_check_interval,
        };
        Pool::new_inner(manager, config)
    }
pub fn build ( self , manager : M ) -> Pool < M > { use std :: cmp ; let max_idle = self . max_idle . unwrap_or_else ( | | cmp :: min ( self . max_open , DEFAULT_MAX_IDLE_CONNS ) ) ; assert ! ( self max_open max_idle " " ) ; let config = Config { max_open : self . max_open , max_idle , max_lifetime : self . max_lifetime , max_idle_lifetime : self . max_idle_lifetime , get_timeout : self . get_timeout , clean_rate : self . clean_rate , max_bad_conn_retries : self . max_bad_conn_retries , health_check : self . health_check , health_check_interval : self . health_check_interval , } ; Pool :: new_inner ( manager , config ) }
Consumes the builder, returning a new, initialized pool.
Consumes the builder returning a new initialized pool .
self
manager
M
self
manager
M
panics
Panics if `max_idle` is greater than `max_size`.
Panics if ` max_idle ` is greater than ` max_size ` .