pub struct PoolStats {
pub idle_connections: usize,
pub active_connections: usize,
pub total_created: usize,
pub max_connections: usize,
}Expand description
Pool statistics.
Fields§
§idle_connections: usizeNumber of idle connections in the pool
active_connections: usizeNumber of connections currently in use
total_created: usizeTotal number of connections created
max_connections: usizeMaximum allowed connections
Implementations§
Source§impl PoolStats
impl PoolStats
Sourcepub fn total_connections(&self) -> usize
pub fn total_connections(&self) -> usize
Get total connections (idle + active).
Sourcepub fn utilization(&self) -> f64
pub fn utilization(&self) -> f64
Get pool utilization as a percentage.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PoolStats
impl RefUnwindSafe for PoolStats
impl Send for PoolStats
impl Sync for PoolStats
impl Unpin for PoolStats
impl UnwindSafe for PoolStats
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