pub struct PooledConnection { /* private fields */ }Expand description
A connection wrapper with health and usage tracking
Implementations§
Source§impl PooledConnection
impl PooledConnection
Sourcepub fn endpoint(&self) -> Arc<RpcEndpoint>
pub fn endpoint(&self) -> Arc<RpcEndpoint>
Get the underlying endpoint
Sourcepub fn inc_pending(&self)
pub fn inc_pending(&self)
Increment pending request count
Sourcepub fn dec_pending(&self)
pub fn dec_pending(&self)
Decrement pending request count
Sourcepub fn pending_count(&self) -> u64
pub fn pending_count(&self) -> u64
Get pending request count
Sourcepub fn is_healthy(&self) -> bool
pub fn is_healthy(&self) -> bool
Check if connection is healthy
Sourcepub fn mark_unhealthy(&self)
pub fn mark_unhealthy(&self)
Mark connection as unhealthy
Sourcepub fn mark_healthy(&self)
pub fn mark_healthy(&self)
Mark connection as healthy
Sourcepub fn idle_duration(&self) -> Duration
pub fn idle_duration(&self) -> Duration
Get time since last use
Auto Trait Implementations§
impl !Freeze for PooledConnection
impl !RefUnwindSafe for PooledConnection
impl Send for PooledConnection
impl Sync for PooledConnection
impl Unpin for PooledConnection
impl UnwindSafe for PooledConnection
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