pub struct Builder<M: Manage, X: Exchange<M>> { /* private fields */ }Expand description
Fluent constructor for Pool.
Implementations§
Source§impl<M: Manage, X: Exchange<M>> Builder<M, X>
impl<M: Manage, X: Exchange<M>> Builder<M, X>
Sourcepub fn acquire_timeout(self, t: impl Into<Option<Duration>>) -> Self
pub fn acquire_timeout(self, t: impl Into<Option<Duration>>) -> Self
How long acquire waits before giving up.
Sourcepub fn max_lifetime(self, t: impl Into<Option<Duration>>) -> Self
pub fn max_lifetime(self, t: impl Into<Option<Duration>>) -> Self
Hard age cap on a connection.
Sourcepub fn idle_timeout(self, t: impl Into<Option<Duration>>) -> Self
pub fn idle_timeout(self, t: impl Into<Option<Duration>>) -> Self
How long a connection may sit idle before being reaped.
Sourcepub fn max_uses(self, n: impl Into<Option<u64>>) -> Self
pub fn max_uses(self, n: impl Into<Option<u64>>) -> Self
Retire a connection after this many checkouts.
Auto Trait Implementations§
impl<M, X> Freeze for Builder<M, X>
impl<M, X> RefUnwindSafe for Builder<M, X>where
M: RefUnwindSafe,
X: RefUnwindSafe,
impl<M, X> Send for Builder<M, X>
impl<M, X> Sync for Builder<M, X>
impl<M, X> Unpin for Builder<M, X>
impl<M, X> UnsafeUnpin for Builder<M, X>where
M: UnsafeUnpin,
X: UnsafeUnpin,
impl<M, X> UnwindSafe for Builder<M, X>where
M: UnwindSafe,
X: UnwindSafe,
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