pub struct ClientPool { /* private fields */ }Expand description
The main structure for the HTTP client management pool
Implementations§
Source§impl ClientPool
impl ClientPool
Sourcepub fn start_monitor_reporter(&self, interval_dur: Duration)
pub fn start_monitor_reporter(&self, interval_dur: Duration)
Periodically prints pool metrics to the console
Sourcepub async fn malloc(&self) -> Option<PooledClientInner>
pub async fn malloc(&self) -> Option<PooledClientInner>
Acquire a client from the pool or create a new one if permitted
Sourcepub fn idle_count(&self) -> usize
pub fn idle_count(&self) -> usize
Returns the number of clients currently available in the pool
Sourcepub fn total_count(&self) -> usize
pub fn total_count(&self) -> usize
Returns the total number of clients managed by this pool
Sourcepub fn working_count(&self) -> usize
pub fn working_count(&self) -> usize
Returns the number of clients currently borrowed and in use
Trait Implementations§
Source§impl Clone for ClientPool
impl Clone for ClientPool
Source§fn clone(&self) -> ClientPool
fn clone(&self) -> ClientPool
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ClientPool
impl !RefUnwindSafe for ClientPool
impl Send for ClientPool
impl Sync for ClientPool
impl Unpin for ClientPool
impl UnsafeUnpin for ClientPool
impl !UnwindSafe for ClientPool
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