pub struct ConnectionPool<C> { /* private fields */ }Expand description
Bounded connections shared by every client given the same pool.
Implementations§
Source§impl<C: Pooled> ConnectionPool<C>
impl<C: Pooled> ConnectionPool<C>
Sourcepub fn new(policy: PoolPolicy) -> Result<Arc<Self>, String>
pub fn new(policy: PoolPolicy) -> Result<Arc<Self>, String>
A pool under policy, which must validate.
pub fn policy(&self) -> &PoolPolicy
Sourcepub fn binding(&self) -> PoolBinding
pub fn binding(&self) -> PoolBinding
The binding view of this pool.
pub fn stats(&self) -> PoolStats
Trait Implementations§
Auto Trait Implementations§
impl<C> !Freeze for ConnectionPool<C>
impl<C> RefUnwindSafe for ConnectionPool<C>where
Mutex<State<C>>: RefUnwindSafe,
impl<C> Send for ConnectionPool<C>
impl<C> Sync for ConnectionPool<C>
impl<C> Unpin for ConnectionPool<C>
impl<C> UnsafeUnpin for ConnectionPool<C>where
Mutex<State<C>>: UnsafeUnpin,
impl<C> UnwindSafe for ConnectionPool<C>where
Mutex<State<C>>: 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