pub struct PoolStatusDisplay { /* private fields */ }Expand description
Display options for pool status.
Implementations§
Source§impl PoolStatusDisplay
impl PoolStatusDisplay
Sourcepub fn from_stats<S: PoolStatsProvider>(stats: &S) -> Self
pub fn from_stats<S: PoolStatsProvider>(stats: &S) -> Self
Create a new pool status display from statistics.
Sourcepub fn new(
active: usize,
idle: usize,
max: usize,
min: usize,
pending: usize,
) -> Self
pub fn new( active: usize, idle: usize, max: usize, min: usize, pending: usize, ) -> Self
Create a pool status display with explicit values.
Sourcepub fn with_acquisition_stats(self, acquires: u64, timeouts: u64) -> Self
pub fn with_acquisition_stats(self, acquires: u64, timeouts: u64) -> Self
Set acquisition statistics.
Sourcepub fn with_lifetime_stats(self, created: u64, closed: u64) -> Self
pub fn with_lifetime_stats(self, created: u64, closed: u64) -> Self
Set lifetime statistics.
Sourcepub fn utilization(&self) -> f64
pub fn utilization(&self) -> f64
Calculate pool utilization as a percentage.
Sourcepub fn health(&self) -> PoolHealth
pub fn health(&self) -> PoolHealth
Determine pool health status.
Sourcepub fn render_plain(&self) -> String
pub fn render_plain(&self) -> String
Render as plain text for agent consumption.
Sourcepub fn render_styled(&self) -> String
pub fn render_styled(&self) -> String
Render with ANSI colors for terminal display.
Trait Implementations§
Source§impl Clone for PoolStatusDisplay
impl Clone for PoolStatusDisplay
Source§fn clone(&self) -> PoolStatusDisplay
fn clone(&self) -> PoolStatusDisplay
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 PoolStatusDisplay
impl RefUnwindSafe for PoolStatusDisplay
impl Send for PoolStatusDisplay
impl Sync for PoolStatusDisplay
impl Unpin for PoolStatusDisplay
impl UnsafeUnpin for PoolStatusDisplay
impl UnwindSafe for PoolStatusDisplay
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