pub enum PressureLevel {
Normal,
Moderate,
High,
Critical,
}Expand description
Memory pressure level thresholds.
The buffer manager uses these levels to determine when to trigger eviction and spilling.
Variants§
Normal
< 70% used - Normal operation, no action needed.
Moderate
70-85% used - Begin evicting cold data proactively.
High
85-95% used - Aggressive eviction, trigger spilling.
Critical
95% used - Critical, block new allocations until memory freed.
Implementations§
Source§impl PressureLevel
impl PressureLevel
Sourcepub const fn description(&self) -> &'static str
pub const fn description(&self) -> &'static str
Returns a human-readable description of this pressure level.
Sourcepub const fn requires_eviction(&self) -> bool
pub const fn requires_eviction(&self) -> bool
Returns whether this level requires eviction action.
Sourcepub const fn should_spill(&self) -> bool
pub const fn should_spill(&self) -> bool
Returns whether this level should trigger spilling.
Sourcepub const fn blocks_allocations(&self) -> bool
pub const fn blocks_allocations(&self) -> bool
Returns whether allocations should be blocked at this level.
Trait Implementations§
Source§impl Clone for PressureLevel
impl Clone for PressureLevel
Source§fn clone(&self) -> PressureLevel
fn clone(&self) -> PressureLevel
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 moreSource§impl Debug for PressureLevel
impl Debug for PressureLevel
Source§impl Display for PressureLevel
impl Display for PressureLevel
Source§impl Hash for PressureLevel
impl Hash for PressureLevel
Source§impl Ord for PressureLevel
impl Ord for PressureLevel
Source§fn cmp(&self, other: &PressureLevel) -> Ordering
fn cmp(&self, other: &PressureLevel) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for PressureLevel
impl PartialEq for PressureLevel
Source§impl PartialOrd for PressureLevel
impl PartialOrd for PressureLevel
impl Copy for PressureLevel
impl Eq for PressureLevel
impl StructuralPartialEq for PressureLevel
Auto Trait Implementations§
impl Freeze for PressureLevel
impl RefUnwindSafe for PressureLevel
impl Send for PressureLevel
impl Sync for PressureLevel
impl Unpin for PressureLevel
impl UnwindSafe for PressureLevel
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.