pub(super) struct Pool<T> {
inner: Option<Arc<Mutex<PoolInner<T>>>>,
}
Fields§
§inner: Option<Arc<Mutex<PoolInner<T>>>>
Implementations§
source§impl<T: Poolable> Pool<T>
impl<T: Poolable> Pool<T>
sourcepub(super) fn checkout(&self, key: (Scheme, Authority)) -> Checkout<T> ⓘ
pub(super) fn checkout(&self, key: (Scheme, Authority)) -> Checkout<T> ⓘ
Returns a Checkout
which is a future that resolves if an idle
connection becomes available.
sourcepub(super) fn connecting(
&self,
key: &(Scheme, Authority),
ver: Ver,
) -> Option<Connecting<T>>
pub(super) fn connecting( &self, key: &(Scheme, Authority), ver: Ver, ) -> Option<Connecting<T>>
Ensure that there is only ever 1 connecting task for HTTP/2 connections. This does nothing for HTTP/1.
pub(super) fn pooled(&self, connecting: Connecting<T>, value: T) -> Pooled<T>
fn reuse(&self, key: &(Scheme, Authority), value: T) -> Pooled<T>
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Pool<T>
impl<T> RefUnwindSafe for Pool<T>
impl<T> Send for Pool<T>where
T: Send,
impl<T> Sync for Pool<T>where
T: Send,
impl<T> Unpin for Pool<T>
impl<T> UnwindSafe for Pool<T>
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