#[non_exhaustive]pub struct PoolMetrics {
pub total: usize,
pub idle: usize,
pub in_use: usize,
pub waiters: usize,
pub total_checkouts: u64,
pub total_created: u64,
pub total_destroyed: u64,
pub total_timeouts: u64,
}Expand description
Snapshot of pool metrics.
Marked #[non_exhaustive] so new counters can be added without breaking
downstream pattern matches or struct construction.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.total: usizeTotal number of connections currently held by the pool (idle + in-use).
idle: usizeNumber of connections currently parked on the idle stack and ready to hand out.
in_use: usizeNumber of connections currently checked out via PoolGuard.
waiters: usizeNumber of tasks currently parked waiting for a connection.
total_checkouts: u64Cumulative count of successful checkouts since the pool was created.
total_created: u64Cumulative count of new connections opened by the pool.
total_destroyed: u64Cumulative count of connections destroyed (closed, evicted, or failed validation).
total_timeouts: u64Cumulative count of get() calls that timed out before acquiring a connection.
Trait Implementations§
Source§impl Clone for PoolMetrics
impl Clone for PoolMetrics
Source§fn clone(&self) -> PoolMetrics
fn clone(&self) -> PoolMetrics
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 PoolMetrics
impl RefUnwindSafe for PoolMetrics
impl Send for PoolMetrics
impl Sync for PoolMetrics
impl Unpin for PoolMetrics
impl UnsafeUnpin for PoolMetrics
impl UnwindSafe for PoolMetrics
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