pub struct PoolOptions { /* private fields */ }Expand description
Options used for connection pool
Implementations§
Source§impl PoolOptions
impl PoolOptions
Sourcepub fn clean_timeout(self, duration: Duration) -> Self
pub fn clean_timeout(self, duration: Duration) -> Self
With this long when a connection is dropped while it is performing a query.
After timeout the connection is closed. And a new connection may then be opened
Sourcepub fn reconnect_time(self, duration: Duration) -> Self
pub fn reconnect_time(self, duration: Duration) -> Self
Wait this long to attempt to connection again if we fail to connect
Sourcepub fn max_connections(self, connection: usize) -> Self
pub fn max_connections(self, connection: usize) -> Self
The maximum number of concurrent connections allowed
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PoolOptions
impl RefUnwindSafe for PoolOptions
impl Send for PoolOptions
impl Sync for PoolOptions
impl Unpin for PoolOptions
impl UnwindSafe for PoolOptions
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