struct PoolInner<T> {
connecting: HashSet<(Scheme, Authority)>,
idle: HashMap<(Scheme, Authority), Vec<Idle<T>>>,
max_idle_per_host: usize,
waiters: HashMap<(Scheme, Authority), VecDeque<Sender<T>>>,
idle_interval_ref: Option<Sender<Infallible>>,
exec: Exec,
timeout: Option<Duration>,
}
Fields§
§connecting: HashSet<(Scheme, Authority)>
§idle: HashMap<(Scheme, Authority), Vec<Idle<T>>>
§max_idle_per_host: usize
§waiters: HashMap<(Scheme, Authority), VecDeque<Sender<T>>>
§idle_interval_ref: Option<Sender<Infallible>>
§exec: Exec
§timeout: Option<Duration>
Implementations§
source§impl<T: Poolable> PoolInner<T>
impl<T: Poolable> PoolInner<T>
fn put( &mut self, key: (Scheme, Authority), value: T, __pool_ref: &Arc<Mutex<PoolInner<T>>>, )
sourcefn connected(&mut self, key: &(Scheme, Authority))
fn connected(&mut self, key: &(Scheme, Authority))
A Connecting
task is complete. Not necessarily successfully,
but the lock is going away, so clean up.
fn spawn_idle_interval(&mut self, pool_ref: &Arc<Mutex<PoolInner<T>>>)
source§impl<T> PoolInner<T>
impl<T> PoolInner<T>
sourcefn clean_waiters(&mut self, key: &(Scheme, Authority))
fn clean_waiters(&mut self, key: &(Scheme, Authority))
Any FutureResponse
s that were created will have made a Checkout
,
and possibly inserted into the pool that it is waiting for an idle
connection. If a user ever dropped that future, we need to clean out
those parked senders.
Auto Trait Implementations§
impl<T> Freeze for PoolInner<T>
impl<T> !RefUnwindSafe for PoolInner<T>
impl<T> Send for PoolInner<T>where
T: Send,
impl<T> Sync for PoolInner<T>
impl<T> Unpin for PoolInner<T>where
T: Unpin,
impl<T> !UnwindSafe for PoolInner<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