[][src]Struct mysql_async::PoolOptions

pub struct PoolOptions { /* fields omitted */ }

Connection pool options.

Methods

impl PoolOptions[src]

pub const fn new(
    constraints: PoolConstraints,
    inactive_connection_ttl: Duration,
    ttl_check_interval: Duration
) -> Self
[src]

Creates PoolOptions.

pub const fn with_constraints(constraints: PoolConstraints) -> Self[src]

Creates default PoolOptions with given constraints.

pub fn set_constraints(&mut self, constraints: PoolConstraints)[src]

Sets pool constraints.

pub fn constraints(&self) -> PoolConstraints[src]

Returns constrains value.

pub fn set_inactive_connection_ttl(&mut self, ttl: Duration)[src]

Pool will recycle inactive connection if it outside of the lower bound of a pool and if it is idling longer than this value (defaults to DEFAULT_INACTIVE_CONNECTION_TTL).

Note that it may, actually, idle longer because of PoolOptions::ttl_check_interval.

pub fn inactive_connection_ttl(&self) -> Duration[src]

Returns inactive_connection_ttl value.

pub fn set_ttl_check_interval(&mut self, interval: Duration)[src]

Pool will check idling connection for expiration with this interval (defaults to DEFAULT_TTL_CHECK_INTERVAL).

If interval is less than one second, then DEFAULT_TTL_CHECK_INTERVAL will be used.

pub fn ttl_check_interval(&self) -> Duration[src]

Returns ttl_check_interval value.

Trait Implementations

impl Clone for PoolOptions[src]

impl Default for PoolOptions[src]

impl Eq for PoolOptions[src]

impl PartialEq<PoolOptions> for PoolOptions[src]

impl Debug for PoolOptions[src]

impl Hash for PoolOptions[src]

impl StructuralPartialEq for PoolOptions[src]

impl StructuralEq for PoolOptions[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> Same<T> for T

type Output = T

Should always be Self