pub enum PressureLevel {
Ok,
Elevated,
Warning,
Critical,
}Expand description
Memory pressure level based on available memory percentage
From lambda-lab-rust-development LAMBDA-0002 specification.
Variants§
Ok
Normal operation (>= 50% available)
Elevated
Monitor closely (30-50% available)
Warning
Reduce parallelism (15-30% available)
Critical
Block new builds (< 15% available)
Implementations§
Source§impl PressureLevel
impl PressureLevel
Sourcepub fn from_available_percent(percent: f64) -> Self
pub fn from_available_percent(percent: f64) -> Self
Determine pressure level from available percentage
Sourcepub fn recommendation(&self) -> &'static str
pub fn recommendation(&self) -> &'static str
Get recommendation text for this pressure level
Sourcepub fn should_block_allocations(&self) -> bool
pub fn should_block_allocations(&self) -> bool
Check if new allocations should be blocked
Sourcepub fn ansi_color(&self) -> &'static str
pub fn ansi_color(&self) -> &'static str
Get ANSI color code for TUI display
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 PartialEq for PressureLevel
impl PartialEq 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 UnsafeUnpin 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