pub struct PoolStats {
pub total_reserved: usize,
pub total_allocated: usize,
pub block_count: usize,
pub alloc_count: u64,
pub free_count: u64,
pub failures: u64,
}Expand description
Statistics for the memory pool.
Fields§
§total_reserved: usizeTotal bytes reserved across all backing blocks.
total_allocated: usizeTotal bytes currently allocated (live).
block_count: usizeNumber of backing blocks.
alloc_count: u64Total number of successful allocations.
free_count: u64Total number of deallocations.
failures: u64Allocation failures due to fragmentation.
Implementations§
Source§impl PoolStats
impl PoolStats
Sourcepub fn free_bytes(&self) -> usize
pub fn free_bytes(&self) -> usize
Bytes still free (reserved but not live-allocated).
Sourcepub fn utilisation(&self) -> f64
pub fn utilisation(&self) -> f64
Utilisation ratio (0.0 – 1.0).
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 UnsafeUnpin 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more