[−][src]Struct mysql_async::PoolOptions
Connection pool options.
Methods
impl PoolOptions
[src]
pub const fn new(
constraints: PoolConstraints,
inactive_connection_ttl: Duration,
ttl_check_interval: Duration
) -> Self
[src]
constraints: PoolConstraints,
inactive_connection_ttl: Duration,
ttl_check_interval: Duration
) -> Self
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]
fn clone(&self) -> PoolOptions
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for PoolOptions
[src]
impl Default for PoolOptions
[src]
impl Eq for PoolOptions
[src]
impl Hash for PoolOptions
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<PoolOptions> for PoolOptions
[src]
fn eq(&self, other: &PoolOptions) -> bool
[src]
fn ne(&self, other: &PoolOptions) -> bool
[src]
impl StructuralEq for PoolOptions
[src]
impl StructuralPartialEq for PoolOptions
[src]
Auto Trait Implementations
impl RefUnwindSafe for PoolOptions
impl Send for PoolOptions
impl Sync for PoolOptions
impl Unpin for PoolOptions
impl UnwindSafe for PoolOptions
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,